Sujet : Re: Can you see that D correctly simulated by H remains stuck in recursive simulation?
De : sam (at) *nospam* email-scan.com (Sam)
Groupes : comp.lang.c++ comp.lang.cDate : 23. May 2024, 22:52:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <cone.1716501172.972762.219193.1004@monster.email-scan.com>
References : 1
User-Agent : https://www.courier-mta.org/cone/
olcott writes:
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 }
Anyone who writes something like this, in my day job, will get fired before the end of the day.
This is the worst chunk of code I've seen in at least fifteen years. It shows a complete lack of understanding of fundamental principles of C and C++.