Path: ...!feeds.phibee-telecom.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Sam Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Can you see that D correctly simulated by H remains stuck in recursive =?UTF-8?Q?simulation=3F?= Date: Thu, 23 May 2024 17:52:52 -0400 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8" Content-Transfer-Encoding: 7bit Injection-Date: Thu, 23 May 2024 23:52:53 +0200 (CEST) Injection-Info: dont-email.me; posting-host="4d10aa1b6ea5379269c688d9e2710a92"; logging-data="2054092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2VO/FTD30+DQLpvyqVmT+" Cancel-Lock: sha1:LMWDuFJOwx1RqUGufTFI//0H3Kc= Content-Disposition: inline X-Shameless-Plug: https://github.com/svarshavchik X-Mailer: https://www.courier-mta.org/cone/ Bytes: 1831 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++.