]> gcc.gnu.org Git - gcc.git/blame - gcc/c-pragma.h
trans-io.c (set_string): Use fold_build2 and build_int_cst instead of build2 and...
[gcc.git] / gcc / c-pragma.h
CommitLineData
3d6f7931 1/* Pragma related interfaces.
d4ff96d5 2 Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
3ef42a0c 3 Free Software Foundation, Inc.
3d6f7931 4
1322177d 5This file is part of GCC.
3d6f7931 6
1322177d
LB
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 2, or (at your option) any later
10version.
3d6f7931 11
1322177d
LB
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
3d6f7931
MM
16
17You should have received a copy of the GNU General Public License
1322177d 18along with GCC; see the file COPYING. If not, write to the Free
366ccddb
KC
19Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
2002110-1301, USA. */
3d6f7931 21
88657302
RH
22#ifndef GCC_C_PRAGMA_H
23#define GCC_C_PRAGMA_H
f09db6e0 24
f4086145
BI
25#include <cpplib.h> /* For enum cpp_ttype. */
26
bc4071dd 27/* Pragma identifiers built in to the front end parsers. Identifiers
c0220ea4 28 for ancillary handlers will follow these. */
bc4071dd
RH
29typedef enum pragma_kind {
30 PRAGMA_NONE = 0,
31
953ff289
DN
32 PRAGMA_OMP_ATOMIC,
33 PRAGMA_OMP_BARRIER,
34 PRAGMA_OMP_CRITICAL,
35 PRAGMA_OMP_FLUSH,
36 PRAGMA_OMP_FOR,
37 PRAGMA_OMP_MASTER,
38 PRAGMA_OMP_ORDERED,
39 PRAGMA_OMP_PARALLEL,
40 PRAGMA_OMP_PARALLEL_FOR,
41 PRAGMA_OMP_PARALLEL_SECTIONS,
42 PRAGMA_OMP_SECTION,
43 PRAGMA_OMP_SECTIONS,
44 PRAGMA_OMP_SINGLE,
45 PRAGMA_OMP_THREADPRIVATE,
46
bc4071dd
RH
47 PRAGMA_GCC_PCH_PREPROCESS,
48
49 PRAGMA_FIRST_EXTERNAL
50} pragma_kind;
51
81a75f0f
NB
52/* Cause the `yydebug' variable to be defined. */
53#define YYDEBUG 1
54extern int yydebug;
55
81a75f0f
NB
56extern struct cpp_reader* parse_in;
57
daefd78b 58#define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK
3d6f7931 59
1e0343dd 60#ifdef HANDLE_SYSV_PRAGMA
e2af664c
NC
61/* We always support #pragma pack for SYSV pragmas. */
62#ifndef HANDLE_PRAGMA_PACK
63#define HANDLE_PRAGMA_PACK 1
64#endif
65#endif /* HANDLE_SYSV_PRAGMA */
66
67
68#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
69/* If we are supporting #pragma pack(push... then we automatically
70 support #pragma pack(<n>) */
71#define HANDLE_PRAGMA_PACK 1
e2af664c
NC
72#endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
73
d7afec4b
ND
74/* It's safe to always leave visibility pragma enabled as if
75 visibility is not supported on the host OS platform the
76 statements are ignored. */
77#define HANDLE_PRAGMA_VISIBILITY 1
0ed5edac
JM
78extern void push_visibility (const char *);
79extern void pop_visibility (void);
d7afec4b 80
5055d3a3 81extern void init_pragma (void);
f09db6e0 82
bc4071dd
RH
83/* Front-end wrappers for pragma registration. */
84typedef void (*pragma_handler)(struct cpp_reader *);
85extern void c_register_pragma (const char *, const char *, pragma_handler);
b5b3e36a 86extern void c_register_pragma_with_expansion (const char *, const char *,
bc4071dd
RH
87 pragma_handler);
88extern void c_invoke_pragma_handler (unsigned int);
89
5055d3a3 90extern void maybe_apply_pragma_weak (tree);
86f029aa 91extern void maybe_apply_pending_pragma_weaks (void);
5055d3a3
AJ
92extern tree maybe_apply_renaming_pragma (tree, tree);
93extern void add_to_renaming_pragma_list (tree, tree);
ecb0eece 94
75ce3d48 95extern enum cpp_ttype pragma_lex (tree *);
bc4071dd
RH
96
97/* This is not actually available to pragma parsers. It's merely a
98 convenient location to declare this function for c-lex, after
99 having enum cpp_ttype declared. */
6037d88d 100extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *);
81a75f0f 101
0173bb6f
AO
102/* If 1, then lex strings into the execution character set.
103 If 0, lex strings into the host character set.
104 If -1, lex both, and chain them together, such that the former
105 is the TREE_CHAIN of the latter. */
106extern int c_lex_string_translate;
21526606 107
c162c75e
MA
108/* If true, strings should be passed to the caller of c_lex completely
109 unmolested (no concatenation, no translation). */
110extern bool c_lex_return_raw_strings;
111
88657302 112#endif /* GCC_C_PRAGMA_H */
This page took 1.446929 seconds and 5 git commands to generate.