2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb49.C
blobc1d70a035766a9c4aee6ae35676dbfb90e1a5f05
1 // { dg-do assemble  }
3 // Here we declare ::S
4 typedef struct s1 *S;
6 struct s1
8   int s;
9 };
11 struct A
13   // Here we declare A::S
14   typedef struct s1 *S;
17 template<class T, class U> class XX;
19 template<class T, class U>
20 class X
22 public:
23   static T *do_something ();
24   friend class T; // { dg-error "" } `T' is a template parameter
25   friend class XX<T, U>;
28 struct N
30   // Here we declare N::S
31   class S
32   {
33   };
35   // Should use N::S and A::S.
36   typedef X<S, A::S> X_S;
38   void bug ();
41 void
42 N::bug ()
44   // X_S is template class X<N::S, A::S>
45   // `s' is N::S.
46   S *s = X_S::do_something ();