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++/52972] Pure virtual method is called instead of child's method


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-13 16:24:07 UTC ---
I think you are getting the correct behavior as the vtable for the base class
is the current vtable for this.

And "        return static_cast < Real* > (this);"  Does not change the vtable
of the return class.


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