aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-pragma.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-05-07 08:58:00 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-05-07 06:58:00 +0000
commit92ff0c419aee64c757481517b44043dbe7c6b501 (patch)
tree5084add9e918868df1cafed96d30bb982b4412ea /gcc/c-pragma.c
parent3c4392aa5fcea6f75971cadcd615269a24dc6d69 (diff)
downloadgcc-92ff0c419aee64c757481517b44043dbe7c6b501.zip
gcc-92ff0c419aee64c757481517b44043dbe7c6b501.tar.gz
gcc-92ff0c419aee64c757481517b44043dbe7c6b501.tar.bz2
re PR c++/14962 (g++ ignores #pragma redefine_extname)
PR c++/14962 * c-pragma.c (handle_pragma_redefine_extname): Only change the assembler name of FUNCTION_DECLs and VAR_DECLs. From-SVN: r81610
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r--gcc/c-pragma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index c9e1505..10c8cae 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)