[Bug c++/45510] Bug with anonymous unions and bit-fields

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Sep 3 20:53:00 GMT 2010



------- Comment #11 from jakub at gcc dot gnu dot org  2010-09-03 20:53 -------
I don't see anything confusing about it.  If you have:
union { int a, b, c; } u;
u.a overlaps u.b and u.c as well, and the same applies to bitfields.  union
isn't struct, see ISO C99 6.7.2.1/5.  The standard is clear on this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45510



More information about the Gcc-bugs mailing list