This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45510] Bug with anonymous unions and bit-fields
- From: "runipg at broadcom dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2010 21:12:33 -0000
- Subject: [Bug c++/45510] Bug with anonymous unions and bit-fields
- References: <bug-45510-19650@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from runipg at broadcom dot com 2010-09-03 21:12 -------
Subject: Re: Bug with anonymous unions and bit-fields
Okay, I guess I was confused by "struct or union" semantics. Thanks!
jakub at gcc dot gnu dot org wrote:
> ------- 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