c++/9407: [3.4 regression] Parser bug
rguenth@tat.physik.uni-tuebingen.de
rguenth@tat.physik.uni-tuebingen.de
Wed Jan 22 21:22:00 GMT 2003
>Number: 9407
>Category: c++
>Synopsis: [3.4 regression] Parser bug
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Jan 22 21:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Richard Guenther
>Release: g++ (GCC) 3.4 20030122 (experimental)
>Organization:
>Environment:
ix86-linux
>Description:
The following testcase is rejected by the new C++ parser
and accepted by earlier g++ and EDG in strict mode.
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;
}
~/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)'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list