diff options
author | kan <kan@FreeBSD.org> | 2002-09-01 20:38:57 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2002-09-01 20:38:57 +0000 |
commit | 2e25f3a6c57335cba50111faceb0ce2ab59e9bcb (patch) | |
tree | c6857d31c36dbd89a881b0229bf38b062797d413 /contrib/gcc/c-pragma.c | |
parent | 0895e1acb698e05d503c26bec5471de2e88b7d93 (diff) | |
download | FreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.zip FreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.tar.gz |
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on 1-Sep-2002 00:00:01 EDT.
Diffstat (limited to 'contrib/gcc/c-pragma.c')
-rw-r--r-- | contrib/gcc/c-pragma.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/contrib/gcc/c-pragma.c b/contrib/gcc/c-pragma.c index d5df355..a0a99fd 100644 --- a/contrib/gcc/c-pragma.c +++ b/contrib/gcc/c-pragma.c @@ -284,9 +284,14 @@ apply_pragma_weak (decl, value) tree decl, value; { if (value) - decl_attributes (&decl, build_tree_list (get_identifier ("alias"), - build_tree_list (NULL, value)), - 0); + { + value = build_string (IDENTIFIER_LENGTH (value), + IDENTIFIER_POINTER (value)); + decl_attributes (&decl, build_tree_list (get_identifier ("alias"), + build_tree_list (NULL, value)), + 0); + } + if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl) && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) warning_with_decl (decl, "applying #pragma weak `%s' after first use results in unspecified behavior"); @@ -343,7 +348,11 @@ handle_pragma_weak (dummy) decl = identifier_global_value (name); if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') - apply_pragma_weak (decl, value); + { + apply_pragma_weak (decl, value); + if (value) + assemble_alias (decl, value); + } else pending_weaks = tree_cons (name, value, pending_weaks); } |