This is the mail archive of the gcc@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]

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;
}




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