aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-04-06 17:17:38 +0000
committerJoseph Myers <joseph@codesourcery.com>2005-04-06 17:17:38 +0000
commit307f6091d5180be7f3e18c80ac8a58ff9de09355 (patch)
tree649a1980a862ee27ee5452e2511599dbef83526b /gcc/c-decl.c
parent5d87643d88d0bc1092a2f58ee70dec1e0c4bd43f (diff)
* c-decl.c (finish_decl): Apply pending #pragma weak regardless of
scope. cp: * decl.c (start_decl): Apply pending #pragma weak regardless of scope. testsuite: * gcc.dg/weak/weak-12.c, g++.dg/ext/weak2.C: New tests. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@97733 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 100f5a7ad46..d02d7429bad 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3262,8 +3262,7 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
}
/* If #pragma weak was used, mark the decl weak now. */
- if (current_scope == file_scope)
- maybe_apply_pragma_weak (decl);
+ maybe_apply_pragma_weak (decl);
/* If this is a variable definition, determine its ELF visibility. */
if (TREE_CODE (decl) == VAR_DECL