This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38908] [4.4 regression] Unexplained "'<anonymous>' is used uninitialized in this function" warning in cc1plus -m64



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]