summaryrefslogtreecommitdiffstats
path: root/gcc/c-pragma.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r--gcc/c-pragma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index 0b169cf5bd1..fd2f7f714ad 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -316,7 +316,7 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy))
warning ("junk at end of #pragma weak");
decl = identifier_global_value (name);
- if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
+ if (decl && DECL_P (decl))
{
apply_pragma_weak (decl, value);
if (value)
OpenPOWER on IntegriCloud