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]

g++ 2.95.2 fails to issue an error despite missing typename keyword


Hi,

the program below compiles without any dignostic despite the missing
required typename keyword (commented out).

Thank you
Martin Sebor


template <class T>
struct A
{
    typedef T X;
};

template <class T>
struct B: public A<T>
{
    typedef /* typename */ A<T>::X X;
};


int main ()
{
    return B<int>::X ();
}


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

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