Deutsch English Français Italiano |
<v3cjj4$28c40$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Mikko <mikko.levanto@iki.fi> Newsgroups: comp.lang.c Subject: Re: D correctly simulated by H cannot possibly reach its own line 06 and halt Date: Fri, 31 May 2024 16:33:24 +0300 Organization: - Lines: 26 Message-ID: <v3cjj4$28c40$1@dont-email.me> References: <v3a40t$1o2ef$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 31 May 2024 15:33:24 +0200 (CEST) Injection-Info: dont-email.me; posting-host="712b1ae307b3aa2da9924d76e81b0b6d"; logging-data="2371712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cko6VV0g20JLM8XepVsgs" User-Agent: Unison/2.2 Cancel-Lock: sha1:qB/L7YHRdpn/408VZ/g7BsTEqag= Bytes: 1506 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