Sujet : Re: do { quit; } else { }
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 11. Apr 2025, 17:27:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtbfsn$1tc7o$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 4/9/25 06:04, Michael S wrote:
On Wed, 9 Apr 2025 11:42:36 +0200
David Brown <david.brown@hesbynett.no> 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)