This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38908] [4.4 regression] Unexplained "'<anonymous>' is used uninitialized in this function" warning in cc1plus -m64
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2009 07:15:32 -0000
- Subject: [Bug c++/38908] [4.4 regression] Unexplained "'<anonymous>' is used uninitialized in this function" warning in cc1plus -m64
- References: <bug-38908-11271@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from mark at codesourcery dot com 2009-02-02 07:15 -------
Subject: Re: [4.4 regression] Unexplained "'<anonymous>' is
used uninitialized in this function" warning in cc1plus -m64
rguenther at suse dot de wrote:
> Ok. But, as opposed to inheritance, inserting empty members seems to
> make a class non-empty:
>
> struct A {};
> struct B { A x; };
I'm surprised by that too, but the ABI definition is:
empty class
A class with no non-static data members other than zero-width
bitfields, no virtual functions, no virtual base classes, and no
non-empty non-virtual proper base classes.
Here, we do have a non-static data member that is not a zero-width
bitfield, so I guess this isn't an empty class.
So, CLASSTYPE_EMPTY_P would be a conservative approximation at present,
but we need a new bit to capture the broader thing that is desired here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38908