aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2000-10-23 17:38:33 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-10-23 17:38:33 -0400
commit6c6ed0ef928235a51966759aa3d6ca6cb960f334 (patch)
tree57169762c729b022aea2e99d12e99240487ac88e /gcc/testsuite
parent57dd137ffb7556e2cbd6e3db18e495a8521e52fb (diff)
downloadgcc-6c6ed0ef928235a51966759aa3d6ca6cb960f334.zip
gcc-6c6ed0ef928235a51966759aa3d6ca6cb960f334.tar.gz
gcc-6c6ed0ef928235a51966759aa3d6ca6cb960f334.tar.bz2
* call.c (equal_functions): Also call decls_match for extern "C" fns.
From-SVN: r37024
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/externC3.C15
1 files changed, 15 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 0000000..4869635
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/externC3.C
@@ -0,0 +1,15 @@
+// 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 ();
+}