summaryrefslogtreecommitdiff
path: root/gcc/c-pragma.c
diff options
context:
space:
mode:
authorbson <bson@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-21 21:25:24 +0000
committerbson <bson@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-21 21:25:24 +0000
commit649d8da671b8294cfd36bbbecc22d2e6d70f545f (patch)
tree9955b06ba9da7010dd96c146915e52676d09d15f /gcc/c-pragma.c
parent9175412d6ac92ee9a762d3033177fcbf9359a75e (diff)
downloadgcc-649d8da671b8294cfd36bbbecc22d2e6d70f545f.tar.gz
bytecode
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r--gcc/c-pragma.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index 9bb92661d2b..002c0946780 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -20,6 +20,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include "config.h"
#include "tree.h"
+#include "function.h"
#ifdef HANDLE_SYSV_PRAGMA
@@ -45,20 +46,7 @@ handle_pragma_token (string, token)
char *string;
tree token;
{
- static 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
- } state = ps_start, type;
+ static enum pragma_state state = ps_start, type;
static char *name;
static char *value;
static int align;
@@ -76,24 +64,8 @@ handle_pragma_token (string, token)
{
#ifdef HANDLE_PRAGMA_WEAK
if (HANDLE_PRAGMA_WEAK)
- {
- if (state == ps_name || state == ps_value)
- {
- fprintf (asm_out_file, "\t%s\t", WEAK_ASM_OP);
- ASM_OUTPUT_LABELREF (asm_out_file, name);
- fputc ('\n', asm_out_file);
- if (state == ps_value)
- {
- fprintf (asm_out_file, "\t%s\t", SET_ASM_OP);
- ASM_OUTPUT_LABELREF (asm_out_file, name);
- fputc (',', asm_out_file);
- ASM_OUTPUT_LABELREF (asm_out_file, value);
- fputc ('\n', asm_out_file);
- }
- }
- else if (! (state == ps_done || state == ps_start))
- warning ("malformed `#pragma weak'");
- }
+ handle_pragma_weak (state, asm_out_file, name, value);
+
#endif /* HANDLE_PRAMA_WEAK */
}