define NO_IMPLICIT_EXTERN_C
[official-gcc.git] / gcc / c-pragma.h
blobbfe7c1fe50a5e30b3dee4ec441a1e938cc1ae160
1 /* Pragma related interfaces.
2 Copyright (C) 1995, 1998, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #ifndef _C_PRAGMA_H
22 #define _C_PRAGMA_H
24 #ifdef HANDLE_SYSV_PRAGMA
25 /* Support #pragma weak iff ASM_WEAKEN_LABEL and ASM_OUTPUT_DEF are
26 defined. */
27 #if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
28 #define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK
29 #endif
31 /* We always support #pragma pack for SYSV pragmas. */
32 #ifndef HANDLE_PRAGMA_PACK
33 #define HANDLE_PRAGMA_PACK 1
34 #endif
35 #endif /* HANDLE_SYSV_PRAGMA */
38 #ifdef HANDLE_PRAGMA_PACK_PUSH_POP
39 /* If we are supporting #pragma pack(push... then we automatically
40 support #pragma pack(<n>) */
41 #define HANDLE_PRAGMA_PACK 1
42 #define PRAGMA_INSERT_ATTRIBUTES(node, pattr, prefix_attr) \
43 insert_pack_attributes (node, pattr, prefix_attr)
44 extern void insert_pack_attributes PROTO((tree, tree *, tree *));
45 #endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
48 #ifdef HANDLE_PRAGMA_WEAK
49 /* This structure contains any weak symbol declarations waiting to be emitted. */
50 struct weak_syms
52 struct weak_syms * next;
53 char * name;
54 char * value;
57 /* Declared in varasm.c */
58 extern struct weak_syms * weak_decls;
60 extern int add_weak PROTO((char *, char *));
61 #endif /* HANDLE_PRAGMA_WEAK */
64 /* Define HANDLE_GENERIC_PRAGMAS if any kind of front-end pragma
65 parsing is to be done. The code in GCC's generic C source files
66 will only look for the definition of this constant. They will
67 ignore definitions of HANDLE_PRAGMA_PACK and so on.
68 With #pragma poison, this is always set. */
69 #define HANDLE_GENERIC_PRAGMAS 1
72 #ifdef HANDLE_GENERIC_PRAGMAS
73 enum pragma_state
75 ps_start,
76 ps_done,
77 #ifdef HANDLE_PRAGMA_WEAK
78 ps_weak,
79 ps_name,
80 ps_equals,
81 ps_value,
82 #endif
83 #ifdef HANDLE_PRAGMA_PACK
84 ps_pack,
85 ps_left,
86 ps_align,
87 ps_right,
88 #endif
89 #ifdef HANDLE_PRAGMA_PACK_PUSH_POP
90 ps_push, ps_pushcomma, ps_pushid, ps_pushcomma2,
91 ps_pop, ps_popcomma,
92 #endif
93 ps_poison,
94 ps_bad
97 /* Handle a C style pragma */
98 extern int handle_pragma_token PROTO((const char *, tree));
100 #endif /* HANDLE_GENERIC_PRAGMAS */
101 #endif /* _C_PRAGMA_H */