• Re: Can someone please verify the execution trace of =?UTF-8?Q?this=3F?

    From Sam@21:1/5 to olcott on Sat May 18 21:12:39 2024
    XPost: comp.lang.c++

    olcott writes:

    People are saying that they have no idea what this code does
    because they do not believe it conforms to c11 or c17.

    typedef int (*ptr)(); // ptr is pointer to int function
    00 int H(ptr x, ptr y);
    01 int D(ptr x)
    02 {
    03 int Halt_Status = H(x, x);
    04 if (Halt_Status)
    05 HERE: goto HERE;
    06 return Halt_Status;
    07 }
    08
    09 int main()
    10 {
    11 H(D,D);
    12 return 0;
    13 }

    This does not conform to any version of C or C++. This looks like a weird hybrid of C and BASIC, where each line of code is prepended with a numeric
    line number.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam@21:1/5 to olcott on Mon May 20 18:59:15 2024
    XPost: comp.lang.c++

    olcott writes:

    On 5/19/2024 8:52 PM, Bonita Montero wrote:

    That's not research, that's nonsense.


    This is not the forum to show that it is not nonsense this is
    a simple C question that I should not even have to ask except
    for a few people in another forum that consistently lie about
    the answer.

    It's much more preferrable to show actual C code, when asking a C question, instead of something that looks like BASIC. There are ways of annotating C
    code that still manages to accomplish the feat of resulting in valid C code, that reads naturally to anyone who expects to read C or C++.

    I have been a professional C++ developer since Y2K. So I already
    know the answer, I just need some competent people in this forum
    to attest to this answer. I met Bjarne Stroustrup back when he
    was going around the country promoting his new language.

    Big deal. You were hoping to impress someone? I've got about a decade on
    you, and I wrote my own K&R C compiler, long before Y2K. I don't brag about
    it. Sit down, kid.

    --
    Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
    hits a target no one else can see." Arthur Schopenhauer

    Of course. A copyright statement. How impressive.

    Your delusions of self-grandeur are only your delusions, not shared by
    anyone else.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam@21:1/5 to olcott on Mon May 20 19:21:05 2024
    XPost: comp.lang.c++

    olcott writes:

    On 5/20/2024 5:59 PM, Sam wrote:

    Big deal. You were hoping to impress someone? I've got about a decade on
    you, and I wrote my own K&R C compiler, long before Y2K. I don't brag about >> it. Sit down, kid.


    People were acting like I was totally clueless.

    Well, there's a name for this phenomenon. It's called "No shit, Sherlock?".

    Of course. A copyright statement. How impressive.

    Your delusions of self-grandeur are only your delusions, not shared by
    anyone else.


    I am only asking about the behavior of a single
    C function template.

    Well, I don't know how to break the news to you, buddy. You better be
    prepared to continue asking, for the foreseeable future. Mastering the art
    of copy/paste is highly recommended.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam@21:1/5 to olcott on Tue May 21 07:48:36 2024
    XPost: comp.lang.c++

    olcott writes:

    People on comp.theory have consistently lied about this
    for at least the last two years:

    typedef int (*ptr)();
    int H(ptr P, ptr I);

    int D(ptr x)
    {
    int Halt_Status = H(x, x);
    if (Halt_Status)
    HERE: goto HERE;
    return Halt_Status;
    }

    int main()
    {
    H(D,D);
    return 0;
    }

    Your C compiler also lied to you, if it ever claimed of succeeding in
    compiling and producing an executable out of this masterpiece.

    This has preventing me from getting to he next step of
    my proof that depends on accepting this.

    Aw, so sad. A bunch of random people on the Intertubes is keeping you from achieving world fame comparable to Einstein's? Sucks to be you.

    Well, I don't know how to break the news to you, buddy. You better be
    prepared to continue asking, for the foreseeable future. Mastering the art >> of copy/paste is highly recommended.


    I worked for the Air Force on
    https://en.wikipedia.org/wiki/NPOESS

    We've got a real-life Forrest Gump here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam@21:1/5 to olcott on Tue May 21 17:55:42 2024
    XPost: comp.lang.c++

    olcott writes:

    On 5/21/2024 2:03 PM, Chris M. Thomasson wrote:
    On 5/21/2024 6:37 AM, olcott wrote:
    On 5/21/2024 6:48 AM, Sam wrote:
    olcott writes:

    People on comp.theory have consistently lied about this
    for at least the last two years:

    typedef int (*ptr)();
    int H(ptr P, ptr I);

    int D(ptr x)
    {
      int Halt_Status = H(x, x);
      if (Halt_Status)
        HERE: goto HERE;
      return Halt_Status;
    }

    int main()
    {
      H(D,D);
      return 0;
    }

    Your C compiler also lied to you, if it ever claimed of succeeding in
    compiling and producing an executable out of this masterpiece.


    Keith Thompson has confirmed that my code both compiles
    and conforms to the c17 standard.

    Where did he say exactly that?

    [...]


    He only commented on the one-line-of code that does vary between
    c17 and c23. The rest of the code has been standard for a long time.
    I have been programming in C back when K & R was the standard.

    On 5/20/2024 9:23 PM, Keith Thompson wrote:
    Message-ID: <[email protected]> http://al.howardknight.net/? STYPE=msgid&MSGI=%3C87v837kinv.fsf%40nosuchdomain.example.com%3E

    That link states that Keith Thompson plainly told you that the code will not link. As such, it cannot be executed, since linking (in order to produce a working executable) is a necessary prerequisite for that.

    As such, all further claims about what the shown code does or does not do,
    are immaterial, because the shown code will never work.

    "Compiled", in common use, frequently encompasses both the compilation and
    the linking stage, and is commonly used to refer to both processes, together.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)