Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: olcott Newsgroups: comp.theory,comp.lang.c Subject: Re: Every D(D) simulated by H presents non-halting behavior to H ### Date: Sat, 18 May 2024 13:20:25 -0500 Organization: A noiseless patient Spider Lines: 37 Message-ID: References: <-5Gdnf-nQvstC6b7nZ2dnZfqnPadnZ2d@brightview.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 18 May 2024 20:20:26 +0200 (CEST) Injection-Info: dont-email.me; posting-host="95afb1fc0a4871125108def5044e156a"; logging-data="3057013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PZ2h8JcQKXFZ8o4o1OIXb" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:9pc7+csQji2fMXH43inU1QiI8KA= Content-Language: en-US In-Reply-To: Bytes: 3476 On 5/18/2024 11:32 AM, James Kuyper wrote: > On 5/18/24 11:44, Richard Damon wrote: >> On 5/18/24 11:34 AM, James Kuyper wrote: >>> On 5/18/24 09:02, Mikko wrote: >>>> On 2024-05-17 17:14:01 +0000, olcott said:...>>>> Fully operational > software that runs under Widows and Linux >>>>> proves that the above is true EMPIRICALLY. > > You cannot prove that code is strictly conforming empirically. It might > simply happen to work on every system you've tried it on. Have you ever > tested it on a system where code and data pointers are different sizes? > I use a compiler option to force 32-bit code. >>>> No, it does not. As the program is not strictly conforming >>>> and uses a non-standard extension some implementation may >>>> execute it differently or refuse to execute. >>> >>> Which non-standard extension does it use? >> >> I think the issue is the casting of a pointer to function to a pointer >> to object, which is one of the grey areas in the standard. (which occurs >> in code not shown) >> >> It is not specified that such a cast is allowed, but it also isn't >> specifically disallowed, it is just omitted as a case in the listing of >> te possibilities for casting. > > Such code has undefined behavior "by the omission of any explicit > definition of behavior." (4p2). > Strictly conforming programs cannot have undefined behavior (4p5). -- Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer