[Bug c/17214] Compatible structures aren't
jsm at polyomino dot org dot uk
gcc-bugzilla@gcc.gnu.org
Fri Aug 27 18:56:00 GMT 2004
------- Additional Comments From jsm at polyomino dot org dot uk 2004-08-27 18:56 -------
Subject: Re: New: Compatible structures aren't
On Fri, 27 Aug 2004, terra at gnome dot org wrote:
> 6.2.7 says
>
> ... For two structures,
> corresponding members shall be declared in the same order.
> For two structures or unions, corresponding bit-fields shall
> have the same widths. ...
>
> Not a word about bitfield names, nor even a requirement that names when
> present match.
Why are you so selectively quoting the standard so as to miss out the
immediately preceding text "such that if one member of a corresponding
pair is declared with a name, the other member is declared with the same
name."?
We know there are problems with the type compatibility rules for
structures across translation units
<http://www.srcf.ucam.org/~jsm28/gcc/pre-dr-1.txt>, but what you've given
isn't such a problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17214
More information about the Gcc-bugs
mailing list