Sujet : Re: D correctly simulated by H cannot possibly reach its own line 06 and halt
De : mikko.levanto (at) *nospam* iki.fi (Mikko)
Groupes : comp.lang.cDate : 31. May 2024, 14:33:24
Autres entêtes
Organisation : -
Message-ID : <v3cjj4$28c40$1@dont-email.me>
References : 1
User-Agent : Unison/2.2
On 2024-05-30 14:55:24 +0000, olcott said:
typedef int (*ptr)(); // ptr is pointer to int function in C
00 int H(ptr p, ptr i);
01 int D(ptr p)
02 {
03 int Halt_Status = H(p, p);
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 }
The left hand-side are line numbers of correct C code.
The C standard specifies that the first line of a program
is line number 1.
-- Mikko