This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37762] Member variable of empty base optimized (EBO) class appears on wrong offset
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Oct 2008 09:48:32 -0000
- Subject: [Bug c++/37762] Member variable of empty base optimized (EBO) class appears on wrong offset
- References: <bug-37762-16792@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from paolo dot carlini at oracle dot com 2008-10-07 09:48 -------
(In reply to comment #3)
> Now, in layman's terms, is the reason for the padding that no two distinct
> instances of Empty may share the same address? If that is the case, it would
> explain the padding and this is not a bug.
Yes, that is a very basic requirement that EBO cannot circumvent. About layman'
explanations of the basic logic, I suggest paragraph 16.2 of "C++ Templates:
The Complete Guide".
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37762