[Bug c++/19063] New: [3.4/4.0 regresion] ICE on invalid template parameter
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 17 23:18:00 GMT 2004
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
More information about the Gcc-bugs
mailing list