This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8895: ICE on invalid template default value specification
- From: bangerth at ticam dot utexas dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 10 Dec 2002 23:09:27 -0000
- Subject: c++/8895: ICE on invalid template default value specification
- Reply-to: bangerth at ticam dot utexas dot edu
>Number: 8895
>Category: c++
>Synopsis: ICE on invalid template default value specification
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Tue Dec 10 15:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
This (illegal) code
-------------------
template <class X, class Y = C<X> >
struct B {
B(int);
B(const B<X,Y>&);
};
-------------------
makes present 3.3 crash:
tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c y.cc
y.cc:1: error: parse error before `<' token
y.cc:4: error: `Y' was not declared in this scope
y.cc:4: error: parse error before `&' token
y.cc:4: error: ISO C++ forbids declaration of `B' with no type
y.cc:4: internal compiler error: Speicherzugriffsfehler
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
gcc2.95 fares a little better:
tmp/g> c++ -c y.cc
y.cc:1: parse error before `<'
y.cc:4: `Y' was not declared in this scope
y.cc:4: parse error before `&'
y.cc:4: ANSI C++ forbids declaration `B' with no type
y.cc:4: confused by earlier errors, bailing out
I don't know whether this is significant enough to
warrant it marking as a regression. Others might
decide this.
Regards
Wolfgang
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: