This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Again a new parser bug
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 22 Jan 2003 22:28:29 +0100 (CET)
- Subject: Again a new parser bug
I keep finding bugs in the new parser by trying to compile pooma with it.
The following testcase is rejected as
~/ix86/gcc3.4/bin/g++ -c parser2.cpp
parser2.cpp: In member function `void Baz<Dim>::foo() [with int Dim = 3]':
parser2.cpp:19: instantiated from here
parser2.cpp:12: error: no match for call to `(Foo<3>::Bar) (int)'
and accepted by earlier g++ and EDG in strict mode. This is c++/9407.
Richard.
template <int Dim>
struct Foo {
struct Bar {
Bar(int);
};
};
template <int Dim>
struct Baz : public Foo<Dim> {
void foo()
{
Foo<Dim>::Bar(1);
}
};
int main()
{
Baz<3> baz;
baz.foo();
return 0;
}