[Bug c++/10898] [3.3 regression] ICE on illegal template parameter (resume_binding_level, at cp/decl.c:598)

reichelt@gcc.gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 22 11:35:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From reichelt@gcc.gnu.org  2003-05-22 11:20 -------
Fixing the missing "typename" keyword, I get another ICE, this time a segfault,
which can be reduced to the following code snippet:

----------------------------------------------------------------
template <BOGUS> struct A
{
    typedef BOGUS X;
    int i;
};
----------------------------------------------------------------

PR10898B.cc:1: error: parse error before `>' token
PR10898B.cc:4: error: template declaration of `int i'
PR10898B.cc:4: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

This ICE can be observed with gcc 2.95.x - 3.3.
The bug is fixed on mainline.

Btw., it looks as if all keywords "typename" were erased in "param.ii".
That needs to be fixed in order to make the code compile.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Gcc-bugs mailing list