gcc/testsuite/g++.dg/lookup/using17.C
raw| 1 | // Copyright (C) 2007 Free Software Foundation |
| 2 | // Contributed by Ollie Wild <[email protected]> |
| 3 | // { dg-do compile } |
| 4 | |
| 5 | namespace M { |
| 6 | struct S {}; // { dg-message "candidates are: .struct M::S." "candidate 1" } |
| 7 | } |
| 8 | |
| 9 | int S; |
| 10 | struct S {}; // { dg-message ".struct S." "candidate 2" } |
| 11 | |
| 12 | using namespace M; |
| 13 | |
| 14 | struct S s; // { dg-error "reference to 'S' is ambiguous|invalid type in declaration" } |