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

             Bug #: 51464
           Summary: [c++0x] ICE with invalid use of []
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: reich...@gcc.gnu.org


The following invalid code snippet triggers an ICE since GCC 4.5.0:

===========================================
template<int = sizeof([])> struct A {};
===========================================

bug.cc:1:23: error: lambda-expression in unevaluated context
bug.cc:1:24: error: definition of 'struct<lambda>' inside template parameter
list
bug.cc:1:24: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in begin_lambda_type, at cp/semantics.c:8609
Please submit a full bug report, [etc.]

Reply via email to