diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/using17.C')
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/using17.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/using17.C b/gcc/testsuite/g++.dg/lookup/using17.C new file mode 100644 index 000000000..b98b21a0c --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/using17.C @@ -0,0 +1,14 @@ +// Copyright (C) 2007 Free Software Foundation +// Contributed by Ollie Wild <aaw@google.com> +// { dg-do compile } + +namespace M { + struct S {}; // { dg-error "struct M::S" "candidate 2" } +} + +int S; +struct S {}; // { dg-error "candidates are: struct S" "candidate 1" } + +using namespace M; + +struct S s; // { dg-error "reference to 'S' is ambiguous|invalid type in declaration" "" } |