Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Mikko Newsgroups: comp.lang.c Subject: Re: Only C programmers tell the truth about the behavior of DD simulated by HHH Date: Fri, 18 Apr 2025 10:18:04 +0300 Organization: - Lines: 31 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 18 Apr 2025 09:18:05 +0200 (CEST) Injection-Info: dont-email.me; posting-host="49fa75b4c752eb90b8da7818f963c4ee"; logging-data="2668074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UK6A1Q6FWkVa5QvBoSgbe" User-Agent: Unison/2.2 Cancel-Lock: sha1:WepLzaOk6fod0DgqPRXMUblD9lw= Bytes: 1507 On 2025-04-17 15:38:30 +0000, olcott said: > typedef void (*ptr)(); > int HHH(ptr P); > > > int DD() > { > int Halt_Status = HHH(DD); > if (Halt_Status) > HERE: goto HERE; > return Halt_Status; > } > > int main() > { > HHH(DD); > } There is no HHH above nor any pointer to any HHH. Threfore the behaviour is undefined. > DD simulated by HHH includes HHH simulating itself > simulating DD until HHH sees the non-terminating > pattern and rejects DD as non-terminating. That cannot be inferred from the shown code. -- Mikko