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++/18855] illegal code compiles and segfaults in runtime


------- 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


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