[Bug c++/54258] Wrong size of a named union.

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 14 16:38:00 GMT 2012


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-14 16:38:32 UTC ---
my_aligned_storage is an empty type, i.e. has no members, so has size 1.

my_aligned_storage::type is not a member, it's a declaration of a type.

If you remove the name 'type' then the anon union is a member, not a type
declaration.



More information about the Gcc-bugs mailing list