This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54258] Wrong size of a named union.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Aug 2012 16:38:32 +0000
- Subject: [Bug c++/54258] Wrong size of a named union.
- Auto-submitted: auto-generated
- References: <bug-54258-4@http.gcc.gnu.org/bugzilla/>
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.