This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]