diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2004-05-07 06:58:00 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@libertysurf.fr> | 2004-05-07 06:58:00 +0000 |
commit | 8d16cb4059147afb494a9d02b509134b3f8bcf2b (patch) | |
tree | 5084add9e918868df1cafed96d30bb982b4412ea /gcc/c-pragma.c | |
parent | 45242b340a87d5ed271012baae210dbb17bf2001 (diff) |
PR c++/14962
* c-pragma.c (handle_pragma_redefine_extname): Only change
the assembler name of FUNCTION_DECLs and VAR_DECLs.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@81610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r-- | gcc/c-pragma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index c9e15056e78..10c8caea35d 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -377,7 +377,8 @@ handle_pragma_redefine_extname (cpp_reader *dummy ATTRIBUTE_UNUSED) warning ("junk at end of #pragma redefine_extname"); decl = identifier_global_value (oldname); - if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') + if (decl && (TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == VAR_DECL)) { if (DECL_ASSEMBLER_NAME_SET_P (decl) && DECL_ASSEMBLER_NAME (decl) != newname) |