summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index f081dadd6b6..adfd1e6c301 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -8328,12 +8328,7 @@ handle_weak_attribute (tree *node, tree name,
return NULL_TREE;
}
else if (VAR_OR_FUNCTION_DECL_P (*node))
- {
- struct symtab_node *n = symtab_node::get (*node);
- if (n && n->refuse_visibility_changes)
- error ("%+D declared weak after being used", *node);
- declare_weak (*node);
- }
+ declare_weak (*node);
else
warning (OPT_Wattributes, "%qE attribute ignored", name);