Merged with mainline at revision 126229.
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / using16.C
blobff6a80ee93f44457b57c798f5d41f1179ff79d65
1 // Copyright (C) 2007 Free Software Foundation
2 // Contributed by Ollie Wild <aaw@google.com>
3 // { dg-do compile }
5 namespace M {
6   struct S {}; // { dg-error "candidates are: struct M::S" "candidate 1" }
9 namespace N {
10   int S;
11   struct S {}; // { dg-error "struct N::S" "candidate 2" }
14 using namespace M;
15 using namespace N;
17 struct ::S s; // { dg-bogus "ambiguous.*ambiguous" "duplicate error" }
18 // { dg-error "reference to 'S' is ambiguous|invalid type" "" { target *-*-* } 17 }}