This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9407: [3.4 regression] Parser bug


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]