Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: James Kuyper Newsgroups: comp.lang.c Subject: Re: do { quit; } else { } Date: Tue, 13 May 2025 22:23:48 -0400 Organization: A noiseless patient Spider Lines: 25 Message-ID: <1000urk$25bh3$1@dont-email.me> References: <86iknecjz8.fsf@linuxsc.com> <86o6x5at05.fsf@linuxsc.com> <20250409170901.947@kylheku.com> <87wmbs45oa.fsf@nosuchdomain.example.com> <87semf4pw5.fsf@nosuchdomain.example.com> <87zfgn344c.fsf@nosuchdomain.example.com> <20250411142636.00006c00@yahoo.com> <20250411102119.431@kylheku.com> <20250413204521.0000238e@yahoo.com> <861psuziq2.fsf@linuxsc.com> <87ecwt37b9.fsf@nosuchdomain.example.com> <1000ne2$2323t$1@dont-email.me> <87wmakaubu.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 14 May 2025 04:23:57 +0200 (CEST) Injection-Info: dont-email.me; posting-host="cf210e9a0249e027cca1397b2d30c730"; logging-data="2272803"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vonKs3CCTURW6cweYTjSQN3XAZmZB2NM=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:e9LXpATUcItjaFOHwUtgr1GnCzE= Content-Language: en-US In-Reply-To: <87wmakaubu.fsf@nosuchdomain.example.com> On 5/13/25 20:51, Keith Thompson wrote: > James Kuyper writes: >> On 5/13/25 05:40, David Brown wrote: .... >>> Yes. Basically, most C programmers are not particularly aware of the >>> technical definitions of some of the terms in C standards where they >>> differ from common usage. The word "compatible" in English means that >>> the things in question can work together or fit together. >> >> That's pretty much what it means in C. Two C types are compatible in C >> if the C standard *guarantees* that they can work together - that you >> can use the types interchangeably. The tricky part is the definition of >> which pairs of types the C standard makes those guarantees for. >> The key point is that the undefined behavior of code which treats >> incompatible types as if they were compatible could also be that they >> work together, too, depending upon the implementation. > > I suggest that the phrase "work together" is too vague. I was trying to match the wording of the text I was responding to. What I meant can be made far more precise: the C standard guarantees that two compatible types will work together, in the sense that every case where the C standard mandates that two types must be compatible in order for something to work, it will work for them.