[Bug c++/18855] illegal code compiles and segfaults in runtime
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Dec 6 15:56:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-06 15:56 -------
operator const Base* () const {
return *this; // --- Illegal type, should be written without *
}
This is not invalid code, this becomes an infite loop though because (Base*)(*this) just calls the same
operator again.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18855
More information about the Gcc-bugs
mailing list