http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
--- Comment #6 from drinob at gmail dot com 2012-04-13 17:43:44 UTC ---
Thank you for your explanation. Now it's all clear.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
--- Comment #5 from Jonathan Wakely 2012-04-13
17:27:33 UTC ---
The standard says "Member functions can be called from a constructor (or
destructor) of an abstract class; the effect of making a virtual call to a pure
virtual function directly or
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
--- Comment #4 from drinob at gmail dot com 2012-04-13 16:35:35 UTC ---
But it seems to work in g++ 4.3 (which is used at ideone.com):
http://ideone.com/zy5R4
Is that behavior uncorrect?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
--- Comment #3 from drinob at gmail dot com 2012-04-13 16:28:36 UTC ---
Yes, this is my mistake.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
--- Comment #1 from Andrew Pinski 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 v