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

==================================================
template<operator+> void foo();

void bar()
{
  foo();
}
==================================================

bug.cc:1: error: expected identifier before 'operator'
bug.cc:1: error: declaration of 'operator+' as non-function
bug.cc: In function 'void bar()':
bug.cc:5: internal compiler error: in type_unification_real, at cp/pt.c:9533
Please submit a full bug report, [etc.]


-- 
           Summary: ICE on invalid template parameter
           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=27670

Reply via email to