• Every sufficiently competent C programmer knows

    From olcott@polcott333@gmail.com to comp.theory,comp.lang.c,comp.lang.c++ on Mon Mar 10 18:41:13 2025
    From Newsgroup: comp.lang.c++

    typedef void (*ptr)();
    int HHH(ptr P);

    void Infinite_Loop()
    {
    HERE: goto HERE;
    return;
    }

    void Infinite_Recursion()
    {
    Infinite_Recursion();
    return;
    }

    void DDD()
    {
    HHH(DDD);
    return;
    }

    int DD()
    {
    int Halt_Status = HHH(DD);
    if (Halt_Status)
    HERE: goto HERE;
    return Halt_Status;
    }

    That when HHH correctly emulates N steps of the
    above functions that none of these functions can
    possibly reach their own "return" instruction
    and terminate normally.

    Since HHH does see that same pattern that competent
    C programmers see it correctly aborts its emulation
    and rejects these inputs as non terminating.
    --
    Copyright 2025 Olcott "Talent hits a target no one else can hit; Genius
    hits a target no one else can see." Arthur Schopenhauer

    --- Synchronet 3.20c-Linux NewsLink 1.2