FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb49.C
blob95c454eaef139175c4ddd039abd8590e66342fb1
1 // Build don't link:
2 // excess errors test
4 // Here we declare ::S
5 typedef struct s1 *S;
7 struct s1
9   int s;
12 struct A
14   // Here we declare A::S
15   typedef struct s1 *S;
18 template<class T, class U> class XX;
20 template<class T, class U>
21 class X
23 public:
24   static T *do_something ();
25   friend class T; // ERROR - `T' is a template parameter
26   friend class XX<T, U>;
29 struct N
31   // Here we declare N::S
32   class S
33   {
34   };
36   // Should use N::S and A::S.
37   typedef X<S, A::S> X_S;
39   void bug ();
42 void
43 N::bug ()
45   // X_S is template class X<N::S, A::S>
46   // `s' is N::S.
47   S *s = X_S::do_something ();