[Bug c++/30340] pure virtual function called on const & declared with previous declaration without a definition, const & assigned by temporary

mjtruog at fastmail dot ca gcc-bugzilla@gcc.gnu.org
Mon Jan 1 20:34:00 GMT 2007



------- Comment #8 from mjtruog at fastmail dot ca  2007-01-01 20:34 -------
Thank you for looking at this.  My mistake.

I didn't realize that when you assign a temporary to a const &, the object is
still destroyed after the assignment (and should then not be used in such a
way, since the contents is undefined).


-- 

mjtruog at fastmail dot ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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



More information about the Gcc-bugs mailing list