This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10111: Parse error for default template parameter
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, philippeb at videotron dot ca
- Date: 18 Mar 2003 00:08:31 -0000
- Subject: Re: c++/10111: Parse error for default template parameter
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, philippeb at videotron dot ca, gcc-gnats at gcc dot gnu dot org
Synopsis: Parse error for default template parameter
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Tue Mar 18 00:08:31 2003
State-Changed-Why:
Duplicate of PR 57. The code with parenthesis around the
default arg now compiles in mainline.
Previous versions of gcc gave a really unhelpful message
on it, funnily:
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
x.cc:13: error: parse error before `;' token
Here is this part of the code:
-----------------
template <int I>
struct B
{
template <class T, class U, class V>
B (const A<T, U, V>&,
typename A<T, U, V>::I = (typename A<T, U, V>::I ()), // #13
typename A<T, U, V>::I = (A<T, U, V>::i)) { }
};
-----------------
There's not ; on line 13, or anywhere close to it...
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10111