This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17214] Compatible structures aren't
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2004 18:56:37 -0000
- Subject: [Bug c/17214] Compatible structures aren't
- References: <20040827173254.17214.terra@gnome.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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