diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/externC3.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/externC3.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/externC3.C b/gcc/testsuite/g++.old-deja/g++.other/externC3.C new file mode 100644 index 000000000..9f56ed3a7 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/externC3.C @@ -0,0 +1,16 @@ +// { dg-do run } +// Test that two extern "C" declarations of the same name in different +// namespaces are treated as declaring the same function. + +namespace foo { + extern "C" int f (); +} + +extern "C" int f () { return 0; } + +using namespace foo; + +int main () +{ + f (); +} |