This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9407: [3.4 regression] Parser bug
- From: rguenth at tat dot physik dot uni-tuebingen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 22 Jan 2003 21:10:05 -0000
- Subject: c++/9407: [3.4 regression] Parser bug
- Reply-to: rguenth at tat dot physik dot uni-tuebingen dot de
>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: