[Bug c++/29001] New: ICE on invalid return from operator new

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Sep 10 10:14:00 GMT 2006


The following invalid code snippet triggers an ICE since at least GCC 2.95.3:

=======================================================
void* operator new (__SIZE_TYPE__) { return; }
=======================================================

bug.cc: In function 'void* operator new(unsigned int)':
bug.cc:1: error: return-statement with no value, in function returning 'void*'
bug.cc:1: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


-- 
           Summary: ICE on invalid return from operator new
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list