diff options
author | Jason Merrill <jason@redhat.com> | 2011-07-22 15:59:49 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-07-22 15:59:49 -0400 |
commit | 3a636414b2c73cb405796d4faf35640897258413 (patch) | |
tree | 316fb84969a5bd89637c30710f3f154a8baf6605 /gcc/c-decl.c | |
parent | 8b9b22755b5c98bfe292f3cf73bba6c53acc47c9 (diff) | |
download | gcc-3a636414b2c73cb405796d4faf35640897258413.zip gcc-3a636414b2c73cb405796d4faf35640897258413.tar.gz gcc-3a636414b2c73cb405796d4faf35640897258413.tar.bz2 |
re PR c++/30112 (pragma redefine_extname fails when namespaces are involved)
PR c++/30112
gcc/c-family/
* c-common.h: Declare c_linkage_bindings.
* c-pragma.c (handle_pragma_redefine_extname): Use it.
gcc/
* c-decl.c (c_linkage_bindings): Define.
gcc/cp/
* decl.c (cp_finish_decl): Apply pragma redefine_extname in
other namespaces as well.
* name-lookup.c (c_linkage_bindings): Define.
(lookup_extern_c_fun_in_all_ns): Rename from
lookup_extern_c_fun_binding_in_all_ns. Return tree.
(pushdecl_maybe_friend_1): Adjust. Copy DECL_ASSEMBLER_NAME.
Co-Authored-By: Mark Glisse <marc.glisse@normalesup.org>
From-SVN: r176650
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 3ed3c46..33d2615 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -8501,6 +8501,14 @@ identifier_global_value (tree t) return 0; } +/* In C, the only C-linkage public declaration is at file scope. */ + +tree +c_linkage_bindings (tree name) +{ + return identifier_global_value (name); +} + /* Record a builtin type for C. If NAME is non-NULL, it is the name used; otherwise the name is found in ridpointers from RID_INDEX. */ |