[Bug c++/53225] static operator new in multiple inheritance carries incorrect type information for the class

daniel.kruegler at googlemail dot com gcc-bugzilla@gcc.gnu.org
Fri May 4 20:10:00 GMT 2012


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



More information about the Gcc-bugs mailing list