aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f180ac1..a72b74c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-04 Mark Mitchell <mark@codesourcery.com>
+
+ * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
+ declarations from different namespaces to be combined.
+
2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
* decl.c: Include tm_p.h.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 0cfcc4d..1af6d27 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -5204,10 +5204,12 @@ do_nonmember_using_decl (scope, name, oldval, oldtype, newval, newtype)
&& compparms (TYPE_ARG_TYPES (TREE_TYPE (new_fn)),
TYPE_ARG_TYPES (TREE_TYPE (old_fn))))
{
- /* There was already a non-using declaration in
- this scope with the same parameter types. */
- cp_error ("`%D' is already declared in this scope",
- name);
+ if (!(DECL_EXTERN_C_P (new_fn)
+ && DECL_EXTERN_C_P (old_fn)))
+ /* There was already a non-using declaration in
+ this scope with the same parameter types. */
+ cp_error ("`%D' is already declared in this scope",
+ name);
break;
}
else if (duplicate_decls (new_fn, old_fn))