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++/30340] pure virtual function called on const & declared with previous declaration without a definition, const & assigned by temporary



------- Comment #6 from fang at csl dot cornell dot edu  2007-01-01 16:42 -------
You can confirm the lifetime of B() by printing something during its
destruction, and during the constructor of C.  You'll be left with a dangling
reference to a temporary whose vptr has been invalidated, hence the error
message.  


-- 


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


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