diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-11-04 18:47:16 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-11-04 18:47:16 +0000 |
commit | 7a4e50911138fcbba07816fa901efa00e57d13cc (patch) | |
tree | 13fb1de5579a98f4ca62dfa649ee101b5187ac41 /gcc/cp/decl2.c | |
parent | 9cf11a478df93ab7640e207c7e73f53eba6e36c8 (diff) | |
download | gcc-7a4e50911138fcbba07816fa901efa00e57d13cc.zip gcc-7a4e50911138fcbba07816fa901efa00e57d13cc.tar.gz gcc-7a4e50911138fcbba07816fa901efa00e57d13cc.tar.bz2 |
decl2.c (do_nonmember_using_decl): Allow `extern "C"' declarations from different namespaces to be combined.
* decl2.c (do_nonmember_using_decl): Allow `extern "C"'
declarations from different namespaces to be combined.
From-SVN: r37254
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 10 |
1 files changed, 6 insertions, 4 deletions
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)) |