Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: James Kuyper Newsgroups: comp.lang.c Subject: Re: do { quit; } else { } Date: Fri, 11 Apr 2025 12:27:03 -0400 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: <8634enhcui.fsf@linuxsc.com> <86ldsdfocs.fsf@linuxsc.com> <20250406161323.00005809@yahoo.com> <86ecy5fjin.fsf@linuxsc.com> <20250406190321.000001dc@yahoo.com> <86plhodtsw.fsf@linuxsc.com> <20250407210248.00006457@yahoo.com> <20250409130449.00002f85@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 11 Apr 2025 18:27:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1101d58e927cb82f23597a7452dea8af"; logging-data="2011384"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TUFuToO/qvUZwFVNOFizlAh1ORmD1oKw=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:5KuKzUaQCAOpLoj5EKz+kGABS/M= Content-Language: en-US In-Reply-To: <20250409130449.00002f85@yahoo.com> Bytes: 2153 On 4/9/25 06:04, Michael S wrote: > On Wed, 9 Apr 2025 11:42:36 +0200 > David Brown wrote: > >> >> In C, if you declare two structs in the same translation unit with >> the same field types and the same field names, they are still >> different types. > > That is clear for structs with tags. Less clear for tagless structs > that have exactly the same fields. "Two declarations of structure, union, or enumerated types which are in different scopes or use different tags declare distinct types. Each declaration of a structure, union, or enumerated type which does not include a tag declares a distinct type." (6.7.2.3p9)