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++/31140] New: [4.3 regression] ICE with ellipsis in template parameter list


The following invalid code snippet triggers an ICE on mainline:

========================================
template<typename T...> void foo()
{
  T t;
}
========================================

bug.cc:1: error: expected nested-name-specifier before 'T'
bug.cc:1: error: ISO C++ does not include variadic templates
bug.cc: In function 'void foo()':
bug.cc:3: error: expected `;' before 't'
bug.cc:3: error: parameter packs not expanded with `...':
bug.cc:3: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'template_parm_index' in
check_for_bare_parameter_packs, at cp/pt.c:2620
Please submit a full bug report, [etc.]

Looks like this was caused by your patch for variadic templates, Douglas:

2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/20599
        * typeck.c (check_return_expr): Check for bare parameter packs.
        (comptypes): Compare template parameter packs and
        type pack expansions.
        ...


-- 
           Summary: [4.3 regression] ICE with ellipsis in template parameter
                    list
           Product: gcc
           Version: 4.3.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=31140


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