OSDN Git Service

new
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / inherit2.C
1 // Test that we warn about unqualified references to implicit typenames.
2 // Bug: g++ is confused by the binding for ::AN and crashes.
3 // Special g++ Options:
4 // crash test - XFAIL *-*-*
5
6 template <class T> struct A {
7   struct AA { };
8   struct AB { };
9   struct AC { };
10 };
11
12 template <class T> struct B: public A<T> {
13   friend struct B::AA;          // OK
14   friend AB;                    // WARNING - needs class-key
15   friend struct AC;             // WARNING - refers to ::AC
16 };
17
18 B<int> b;
19
20 int main () { }