summaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 4738fee911c..b95c438988e 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1228,7 +1228,7 @@ darwin_handle_weak_import_attribute (tree *node, tree name,
int ARG_UNUSED (flags),
bool * no_add_attrs)
{
- if (TREE_CODE (*node) != FUNCTION_DECL)
+ if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
{
warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;