diff options
author | Joseph Myers <joseph@codesourcery.com> | 2005-04-06 18:17:38 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2005-04-06 18:17:38 +0100 |
commit | 3693d46c9777b4e24b42467a80e47f32f727aa71 (patch) | |
tree | 649a1980a862ee27ee5452e2511599dbef83526b /gcc/c-decl.c | |
parent | c634366a354b7f9065616adea64cd5506d347b36 (diff) | |
download | gcc-3693d46c9777b4e24b42467a80e47f32f727aa71.zip gcc-3693d46c9777b4e24b42467a80e47f32f727aa71.tar.gz gcc-3693d46c9777b4e24b42467a80e47f32f727aa71.tar.bz2 |
c-decl.c (finish_decl): Apply pending #pragma weak regardless of scope.
* 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.
From-SVN: r97733
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 100f5a7..d02d742 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 |