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 22:04:58 +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 #25 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-05-04 22:04:58 UTC ---
(In reply to comment #23)
> You don't even have a B::this_type typedef, how could (this_type*) possibly
> refer to anything except A*? Just by calling it "this_type" doesn't make it
> magic that the compiler adjusts to refer to teh dynamic type.
>
> Daniel, can you explain it to him better?
I found your explanations just excellent and I have no idea at the moment.
Thomas, if you think that we did not really understand your point, please make
something more observable from your program mentioned in comment 11, e.g.
produce variables and put them out to via printf/cout make clearer what you
want to say. Keep in mind that operator new *is* a static function even though
it does not need to be declared as static.