This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53225] static operator new in multiple inheritance carries incorrect type information for the class
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 20:09:55 +0000
- Subject: [Bug c++/53225] static operator new in multiple inheritance carries incorrect type information for the class
- Auto-submitted: auto-generated
- References: <bug-53225-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53225
--- Comment #13 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-05-04 20:09:55 UTC ---
(In reply to comment #11)
> Jonathan, but there is "magical adjustment" as you put it, as the following
> code works correctly:
The difference in your modified example is that the conversions are performed
*after* the complete object initialization. As Jonathan described in comment 5,
your original problem did not work, because you asked the compiler for the
adjustment at a point where this is not valid. This is described by the
life-time rules in C++.