Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/using9.C

raw
1 // { dg-do assemble }
2 //
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Feb 2001 <[email protected]>
5
6 // Bug 75. using declarations cannot introduce functions which ambiguate
7 // those in the current namespace, BUT here we're reaccessing the current
8 // namespace -- the function is not being 'introduced'.
9
10 extern int a();
11 struct x {};
12
13 using ::x;
14 using ::a;
15
16 extern "C" void foo (); // { dg-message "previous declaration" }
17
18 namespace {
19 extern "C" int foo (); // { dg-error "18:conflicting C.*linkage" }
20 using ::foo; // { dg-error "" } already in use
21 }