Liste des Groupes | Revenir à cl c |
On Sat, 18 May 2024 16:40:45 -0500, olcott wrote:I explain that below in the part that you skipped.
People are saying that they have no idea what this code doeshere you call H(D,D) D is just a pointer, but what is H? if it is a
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 }
ponter for me the program is not definited and has to stop here
im not one expert of C
--In the above case a simulator is an x86 emulator that correctly emulates
at least one of the x86 instructions of D in the order specified by the
x86 instructions of D.
>
This may include correctly emulating the x86 instructions of H in the
order specified by the x86 instructions of H thus calling H(D,D) in
recursive simulation.
>
*Execution Trace*
Line 11: main() invokes H(D,D);
>
*keeps repeating* (unless aborted)
Line 01:
Line 02:
Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D)
>
*Simulation invariant*
D correctly simulated by H cannot possibly reach past its own line 03.
>
The key thing to note is that no D correctly simulated by any H of every
H/D pair specified by the above template ever reaches its own line 06
and halts.
Les messages affichés proviennent d'usenet.