This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13614] zero size base class not zero size in complex inheritance
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2004 19:07:21 -0000
- Subject: [Bug c++/13614] zero size base class not zero size in complex inheritance
- References: <20040108152112.13614.lawless@spamcop.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From nathan at gcc dot gnu dot org 2004-01-08 19:07 -------
gcc is correct
Class D
size=5 align=1
base size=5 base align=1
D (0x4027cb00) 0
B1 (0x4027cb40) 0 empty
B3 (0x4027cb80) 1
B3 cannot be placed at offset zero in D, as that would create two different
B1 objects (the direct base of D and the direct base of the first B2 object
in B3's array member) at the same address. That would violate a C++ invariant.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13614