Re: Only C programmers tell the truth about the behavior of DD simulated by HHH

Liste des GroupesRevenir à l c 
Sujet : Re: Only C programmers tell the truth about the behavior of DD simulated by HHH
De : mikko.levanto (at) *nospam* iki.fi (Mikko)
Groupes : comp.lang.c
Date : 18. Apr 2025, 08:18:04
Autres entêtes
Organisation : -
Message-ID : <vtsubc$2hdha$1@dont-email.me>
References : 1
User-Agent : Unison/2.2
On 2025-04-17 15:38:30 +0000, olcott said:

typedef void (*ptr)();
int HHH(ptr P);
  int DD()
{
   int Halt_Status = HHH(DD);
   if (Halt_Status)
     HERE: goto HERE;
   return Halt_Status;
}
 int main()
{
   HHH(DD);
}
There is no HHH above nor any pointer to any HHH. Threfore the
behaviour is undefined.

DD simulated by HHH includes HHH simulating itself
simulating DD until HHH sees the non-terminating
pattern and rejects DD as non-terminating.
That cannot be inferred from the shown code.
--
Mikko

Date Sujet#  Auteur
17 Apr 25 * Only C programmers tell the truth about the behavior of DD simulated by HHH22olcott
17 Apr 25 +* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH19Bonita Montero
17 Apr 25 i`* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH18olcott
18 Apr 25 i +* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH16Bonita Montero
18 Apr 25 i i+* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH2olcott
18 Apr 25 i ii`- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1Bonita Montero
19 Apr 25 i i`* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH13Mikko
19 Apr 25 i i +* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH11Bonita Montero
19 Apr 25 i i i`* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH10olcott
20 Apr 25 i i i `* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH9Mikko
20 Apr 25 i i i  `* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH8olcott
20 Apr 25 i i i   +* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH4Bonita Montero
20 Apr 25 i i i   i+- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1olcott
20 Apr 25 i i i   i`* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH2Chris M. Thomasson
20 Apr 25 i i i   i `- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1olcott
21 Apr 25 i i i   `* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH3Mikko
21 Apr 25 i i i    `* Re: Only C programmers tell the truth about the behavior of DD simulated by HHH2olcott
22 Apr 25 i i i     `- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1Mikko
19 Apr 25 i i `- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1olcott
18 Apr 25 i `- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1Wuns Haerst
17 Apr 25 +- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1Richard Damon
18 Apr 25 `- Re: Only C programmers tell the truth about the behavior of DD simulated by HHH1Mikko

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal