Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Michael S Newsgroups: comp.lang.c Subject: Re: do { quit; } else { } Date: Sun, 13 Apr 2025 20:45:21 +0300 Organization: A noiseless patient Spider Lines: 35 Message-ID: <20250413204521.0000238e@yahoo.com> References: <20250407210248.00006457@yahoo.com> <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> <20250411102119.431@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Sun, 13 Apr 2025 19:45:26 +0200 (CEST) Injection-Info: dont-email.me; posting-host="9863df71b68e2ba3072c62004daf6125"; logging-data="3566608"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yOwTnotWkBW1cAoHzM5UP6oP94WgGdK8=" Cancel-Lock: sha1:6is/uNpmDB4IdDzmpDmNvgkYmZo= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) Bytes: 3068 On Fri, 11 Apr 2025 17:22:37 -0000 (UTC) Kaz Kylheku <643-408-1753@kylheku.com> wrote: > On 2025-04-11, Michael S wrote: > > 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. > > so struct { long x; } and struct { int x; } are compatible enough, > in situations that are portable enough. > I wish they would be, but according to C Standard they are not, ene when both represent 32-bt signed integer. That's because of misfeature called 'strong aliasing rules'. IMO, C would become better without this misfeature. > A sphere and a cow are similar enough, ... > Bad attempt of analogy.