Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: do { quit; } else { } Date: Fri, 11 Apr 2025 11:20:48 -0700 Organization: None to speak of Lines: 24 Message-ID: <87mscmsgov.fsf@nosuchdomain.example.com> References: <868qoaeezc.fsf@linuxsc.com> <86mscqcpy1.fsf@linuxsc.com> <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> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 11 Apr 2025 20:20:48 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c7132c9dc01e9da84b004e8ef39b7407"; logging-data="2384762"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19V9lGedWLy/UOVbVtu2OMC" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:1OhKsCALhnQGG2DR2H/8tpEA4h4= sha1:joZ4VdIUNCiXKq3/EWKJ5FPV+S0= Bytes: 2681 Michael S writes: > On Thu, 10 Apr 2025 17:59:15 -0700 > Keith Thompson wrote: >> An understanding of what "compatible types" means. > > Bart didn't say that types are compatible or non-compatible. > He said that they are 'compatible enough'. That is not terminology of C > Standard, but terminology of his own. And he seems to understand it. > > In my own translation, 'compatible enough' means that when these structs > are accessed then any sane or even semi-sane compiler will generate code > that will have the same effect as in case of access through structures > with literally identical declarations. Your speculation about what Bart meant is, I think, likely to be correct. If it is, he's talking about types having the same representation. That's not what "compatibility" means. Calling types "compatible enough" when they merely have the same representation is misleading. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */