Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Richard Heathfield Newsgroups: comp.theory Subject: Re: Every sufficiently competent C programmer knows Date: Sun, 16 Mar 2025 21:01:22 +0000 Organization: Fix this later Lines: 49 Message-ID: References: <473a9a152c792a48c83eea569551035994c9d04f@i2pn2.org> <877c4owze2.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 16 Mar 2025 22:01:26 +0100 (CET) Injection-Info: dont-email.me; posting-host="a529dc3af0353b9c5ff5ffc2a853f4f5"; logging-data="2635254"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++CqbR1hK78A8x6psysjz6AeWitYz/RENqKAGTDYxfNA==" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:VKBaRlUp36+CVuyv26bhnqPeD/U= In-Reply-To: <877c4owze2.fsf@nosuchdomain.example.com> Content-Language: en-GB On 16/03/2025 19:26, Keith Thompson wrote: > Richard Heathfield writes: >> On 16/03/2025 10:31, Mikko wrote: >>> False. You didn't say that HHH is a C function. In particular, the >>> code >>> shown above does not say so. >> >> It scarcely qualifies as C. >> >> For example, it begins by a goto this code: >> >> __asm__("lea eax, DATA1"); >> __asm__("mov Aborted, eax"); >> __asm__("lea eax, DATA2"); >> __asm__("mov execution_trace, eax"); >> __asm__("mov eax, END_OF_CODE"); >> __asm__("mov End_Of_Code, eax"); >> >> which any C compiler is free to reject. >> >> C99 introduced the asm keyword, but that's spelled asm, not __asm__, >> and of course it's not a magic wand, so it can't make an inherently >> unportable program work on every platform supported by C >> compilers. C/370, for example, would have a fit. > > No, C99 didn't introduce the asm keyword. You're right, of course. Refusing to trust my memory for post-1990 C, I checked by searching my PDF, found it, and forgot to check where I'd ended up (deep in the heart of "common extensions"). > I don't think Olcott intends HHH to be fully portable C (assuming > he knows what that means). That's a daring assumption. > In any case, his claims about "Every > sufficiently competent C programmer" are ludicrous. I can remove almost half the words from that sentence without affecting its inherent accuracy. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within