This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19063] New: [3.4/4.0 regresion] ICE on invalid template parameter
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2004 23:18:42 -0000
- Subject: [Bug c++/19063] New: [3.4/4.0 regresion] ICE on invalid template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following testcase causes an ICE since gcc 3.4.0:
===================================
template<operator> struct A {};
===================================
PR13268B.cc:5: error: expected identifier before 'operator'
PR13268B.cc:5: error: declaration of 'operator>' as non-function
PR13268B.cc:5: internal compiler error: tree check: expected class
'declaration', have 'type' (void_type) in process_template_parm, at cp/pt.c:2318
Please submit a full bug report, [etc.]
The bug is similar to PR13268 in that grokdeclarator returns values that
the caller cannot handle gracefully.
But in this case we actually have a regression.
Btw, if an error occurs, grokdeclarator might be returning 0 (which should
probably be NULL_TREE), error_mark_node (which is not documented) or
void_type_node (even if the caller expects a declaration as in this bug)
or ...
Is this intended, or is some heavy cleanup required?
--
Summary: [3.4/4.0 regresion] ICE on invalid template parameter
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19063