2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / using8.C
blob2700bb27cd6cd5a58bd2ee85aa1f1676cf1553a8
1 // { dg-do assemble  }
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 14 Nov 2000 <nathan@codesourcery.com>
6 // We rejected using decls bringing in functions from a base which would hide a
7 // nested class of the same name, but only if we had no functions by that name
8 // already. Also, we failed to find that using declaration during lookup. Also
9 // we failed to reject using declarations which matched the constructor name.
11 struct A
13   int f ();
14   void D ();
17 struct A2 {
18   typedef int f;
21 struct B : A 
23   using A::f;
24   struct f {};
27 struct C : A 
29   using A::f;
30   int f (int);
31   struct f {};
34 void foo (B *bp, C* cp)
36   bp->f ();
37   cp->f ();
40 struct D : A
42   using A::D;   // { dg-error "" } names constructor