diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-04-18 18:16:51 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-04-18 18:16:51 +0000 |
commit | 917aa082e55c138c5b684f81441d39756763f400 (patch) | |
tree | db6dcc9aaea350dc8e6ad9b635b41529042f0167 /gcc/varasm.c | |
parent | 212d6fcf1695c3ca1aa89cd4e4319c66c9c2534e (diff) | |
download | gcc-917aa082e55c138c5b684f81441d39756763f400.tar.gz |
Move pragma interface support to c-pragma.h
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index d8226139828..4ea82fcb593 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -42,6 +42,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "bytecode.h" #include "obstack.h" +#include "c-pragma.h" #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" @@ -97,7 +98,7 @@ int size_directive_output; tree last_assemble_variable_decl; -#if defined (HANDLE_PRAGMA_WEAK) || (defined (WEAK_ASM_OP) && defined (ASM_OUTPUT_DEF)) +#ifdef HANDLE_PRAGMA_WEAK /* Any weak symbol declarations waiting to be emitted. */ struct weak_syms @@ -3926,35 +3927,12 @@ output_constructor (exp, size) assemble_zeros (size - total_bytes); } -/* Support #pragma weak by default if WEAK_ASM_OP and ASM_OUTPUT_DEF - are defined. */ -#if !defined (HANDLE_PRAGMA_WEAK) && defined (WEAK_ASM_OP) && defined (ASM_OUTPUT_DEF) -#define HANDLE_PRAGMA_WEAK 1 -#endif - #if defined (HANDLE_SYSV_PRAGMA) && defined (HANDLE_PRAGMA_WEAK) -/* See c-pragma.c for an identical definition. */ -enum pragma_state -{ - ps_start, - ps_done, - ps_bad, - ps_weak, - ps_name, - ps_equals, - ps_value, - ps_pack, - ps_left, - ps_align, - ps_right -}; - /* Output asm to handle ``#pragma weak'' */ void -handle_pragma_weak (what, out_file, name, value) +handle_pragma_weak (what, name, value) enum pragma_state what; - FILE *out_file; char *name, *value; { if (what == ps_name || what == ps_value) @@ -3988,12 +3966,17 @@ void declare_weak (decl) tree decl; { +#ifdef HANDLE_PRAGMA_WEAK if (! TREE_PUBLIC (decl)) error_with_decl (decl, "weak declaration of `%s' must be public"); else - handle_pragma_weak (ps_name, asm_out_file, + handle_pragma_weak (ps_name, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), NULL_PTR); + +#else + error ("weak declarations are not supported in this configuration"); +#endif } /* Emit any pending weak declarations. */ |