This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51096] No EBCO if a member of the base class type is defined
- 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: Fri, 11 Nov 2011 14:11:53 +0000
- Subject: [Bug c++/51096] No EBCO if a member of the base class type is defined
- Auto-submitted: auto-generated
- References: <bug-51096-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51096
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-11 14:11:53 UTC ---
The standard says the empty base and Derived::a must have distinct addresses:
"Two objects that are not bit-fields may have the same address if one is a
subobject of the other, or if at least one is a base class subobject of zero
size and they are of different types; otherwise, they shall have distinct
addresses."