Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/lookup/pr77549.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/77549 // { dg-do compile } struct A { static int x; }; void f1 () { using ::A; x; // { dg-error "'x' was not declared in this scope" } } namespace N { int bar; } void f2 () { using N::bar; baz++; // { dg-error "'baz' was not declared in this scope; did you mean 'bar'\\?" } } int bar () { return 0; } namespace M { int bar () { return 0; } } void f3 () { using M::bar; baz (); // { dg-error "'baz' was not declared in this scope; did you mean 'bar'\\?" } } namespace O { int foo () { return 0; } } namespace P { int bar () { return 0; } } void f4 () { using O::foo; using P::bar; fooo (); // { dg-error "'fooo' was not declared in this scope; did you mean 'foo'\\?" } baz (); // { dg-error "'baz' was not declared in this scope; did you mean 'bar'\\?" } }