X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Flookup%2Fusing18.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Flookup%2Fusing18.C;h=37557148ea6c44aa8a1e49b4f28b28087d89341d;hb=f8be65bb3cad41ca6c58a6631e8976df2e8789b5;hp=0000000000000000000000000000000000000000;hpb=c21f4fcd059e1d9644062d61ef5eefc6bcdd177c;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/testsuite/g++.dg/lookup/using18.C b/gcc/testsuite/g++.dg/lookup/using18.C new file mode 100644 index 00000000000..37557148ea6 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/using18.C @@ -0,0 +1,20 @@ +// Copyright (C) 2007 Free Software Foundation +// Contributed by Ollie Wild +// { dg-do compile } + +namespace N1 { + void f (); + struct f; // { dg-error "" "candidate" } +} + +namespace N2 { + void f (int); + struct f; // { dg-error "" "candidate" } +} + +namespace M { + using namespace N1; + using namespace N2; +} + +using M::f; // { dg-error "ambiguous" }