Sujet : Re: Every D(D) simulated by H presents non-halting behavior to H ###
De : polcott333 (at) *nospam* gmail.com (olcott)
Groupes : comp.theoryDate : 18. May 2024, 00:00:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v28njc$2dp3s$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Mozilla Thunderbird
On 5/17/2024 3:02 PM, Alan Mackenzie wrote:
olcott <polcott333@gmail.com> wrote:
On 5/16/2024 11:15 AM, Alan Mackenzie wrote:
olcott <polcott333@gmail.com> wrote:
On 5/16/2024 5:48 AM, Mikko wrote:
On 2024-05-15 15:24:57 +0000, olcott said:
[ .... ]
Normal semantics is that the program is not executed.
Indeed.
typedef int (*ptr)(); // ptr is pointer to int function
00 int H(ptr x, ptr x);
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 }
Can you find any compiler that is liberal enough to accept that?
It has been fully operational code under Windows and
Linux for two years.
That is another of your lies. It's largely why I despise you so much.
Although you've fixed the missing semicolon on line 0 (at last), it still
fails to compile under any C compiler worthy of the name. With all the
errors in it it still would have failed to compile under Linux or Windows
ever since it was written.
Quit lying. And fix that program fragment, assuming your C skills are up
to it.
There are many postings in this group providing the
actual execution trace output of that program.
That "program" doesn't compile. It's ill-formed.
This does compile under C17 and C11
with Microsoft Visual Studio 2022
*Maybe you forgot to take the line numbers out*
*Maybe you forgot to take the line numbers out*
*Maybe you forgot to take the line numbers out*
*Maybe you forgot to take the line numbers out*
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;
}
cl /GS- /std:c11 /c /arch:IA32 Test_Compile.c
cl /GS- /std:c17 /c /arch:IA32 Test_Compile.c
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32535 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
Test_Compile.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32535 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
Test_Compile.c
Press any key to continue . . .
-- Copyright 2024 Olcott "Talent hits a target no one else can hit; Geniushits a target no one else can see." Arthur Schopenhauer