c++/5657: ICE in template with parameter of undedefined type
reichelt@igpm.rwth-aachen.de
reichelt@igpm.rwth-aachen.de
Mon Feb 11 09:29:00 GMT 2002
>Number: 5657
>Category: c++
>Synopsis: ICE in template with parameter of undedefined type
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Mon Feb 11 09:16:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Volker Reichelt
>Release: gcc version 3.1 20020204 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The following two lines of code cause an ICE
(note that the code is illegal, since B hasn't been defined):
template<typename T> struct A { A(B); };
template<typename T> A<T>::A(B) {}
The error message is:
bug.cpp:1: parse error before `)' token
bug.cpp:2: parse error before `)' token
bug.cpp:2: Internal compiler error in poplevel, at cp/decl.c:1288
Please submit a full bug report, [etc.]
>How-To-Repeat:
g++ -c bug.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list