]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/c-common.h
tree-core.h: Include symtab.h.
[thirdparty/gcc.git] / gcc / c-family / c-common.h
CommitLineData
7f4edbcb 1/* Definitions for c-common.c.
5624e564 2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
7f4edbcb 3
1322177d 4This file is part of GCC.
7f4edbcb 5
1322177d
LB
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
9dcd6f09 8Software Foundation; either version 3, or (at your option) any later
1322177d 9version.
7f4edbcb 10
1322177d
LB
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
7f4edbcb
BS
15
16You should have received a copy of the GNU General Public License
9dcd6f09
NC
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
7f4edbcb 19
0e5921e8
ZW
20#ifndef GCC_C_COMMON_H
21#define GCC_C_COMMON_H
22
8f17b5c5 23#include "splay-tree.h"
2a967f3d 24#include "cpplib.h"
40e23961
MC
25#include "alias.h"
26#include "flags.h"
532aafad 27#include "tree.h"
40e23961 28#include "fold-const.h"
8f17b5c5 29
59cc9210
SB
30/* In order for the format checking to accept the C frontend
31 diagnostic framework extensions, you must include this file before
718f9c0f 32 diagnostic-core.h, not after. The C front end formats are a subset of those
59cc9210
SB
33 for C++, so they are the appropriate set to use in common code;
34 cp-tree.h overrides this for C++. */
718f9c0f
MLI
35#if defined(GCC_DIAGNOSTIC_CORE_H)
36#error \
37In order for the format checking to accept the C front end diagnostic \
38framework extensions, you must include this file before diagnostic-core.h \
39never after.
40#endif
59cc9210
SB
41#ifndef GCC_DIAG_STYLE
42#define GCC_DIAG_STYLE __gcc_cdiag__
43#endif
44#include "diagnostic-core.h"
45
f2c5f623 46/* Usage of TREE_LANG_FLAG_?:
3af07c22 47 0: IDENTIFIER_MARKED (used by search routines).
928c19bb 48 C_MAYBE_CONST_EXPR_INT_OPERANDS (in C_MAYBE_CONST_EXPR, for C)
f2c5f623 49 1: C_DECLARED_LABEL_FLAG (in LABEL_DECL)
325c3691 50 STATEMENT_LIST_STMT_EXPR (in STATEMENT_LIST)
928c19bb 51 C_MAYBE_CONST_EXPR_NON_CONST (in C_MAYBE_CONST_EXPR, for C)
6de9cd9a 52 2: unused
174283a3 53 3: STATEMENT_LIST_HAS_LABEL (in STATEMENT_LIST)
325c3691 54 4: unused
f2c5f623
BC
55*/
56
0e5921e8 57/* Reserved identifiers. This is the union of all the keywords for C,
40f03658 58 C++, and Objective-C. All the type modifiers have to be in one
0e5921e8 59 block at the beginning, because they are used as mask bits. There
bbceee64 60 are 28 type modifiers; if we add many more we will have to redesign
0e5921e8 61 the mask mechanism. */
f09f1de5
MM
62
63enum rid
64{
0e5921e8 65 /* Modifiers: */
2ba84f36 66 /* C, in empirical order of frequency. */
0e5921e8
ZW
67 RID_STATIC = 0,
68 RID_UNSIGNED, RID_LONG, RID_CONST, RID_EXTERN,
69 RID_REGISTER, RID_TYPEDEF, RID_SHORT, RID_INLINE,
70 RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT,
267bac10 71 RID_NORETURN, RID_ATOMIC,
0e5921e8
ZW
72
73 /* C extensions */
ab22c1fa 74 RID_COMPLEX, RID_THREAD, RID_SAT,
0e5921e8
ZW
75
76 /* C++ */
77 RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE,
78
1973201f
NP
79 /* ObjC ("PQ" reserved words - they do not appear after a '@' and
80 are keywords only in specific contexts) */
b8363a24 81 RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
0e5921e8 82
668ea4b1
IS
83 /* ObjC ("PATTR" reserved words - they do not appear after a '@'
84 and are keywords only as property attributes) */
200290f2
NP
85 RID_GETTER, RID_SETTER,
86 RID_READONLY, RID_READWRITE,
87 RID_ASSIGN, RID_RETAIN, RID_COPY,
200290f2 88 RID_NONATOMIC,
668ea4b1 89
fa5da7de
JM
90 /* C (reserved and imaginary types not implemented, so any use is a
91 syntax error) */
92 RID_IMAGINARY,
93
0e5921e8
ZW
94 /* C */
95 RID_INT, RID_CHAR, RID_FLOAT, RID_DOUBLE, RID_VOID,
96 RID_ENUM, RID_STRUCT, RID_UNION, RID_IF, RID_ELSE,
97 RID_WHILE, RID_DO, RID_FOR, RID_SWITCH, RID_CASE,
98 RID_DEFAULT, RID_BREAK, RID_CONTINUE, RID_RETURN, RID_GOTO,
99 RID_SIZEOF,
100
101 /* C extensions */
102 RID_ASM, RID_TYPEOF, RID_ALIGNOF, RID_ATTRIBUTE, RID_VA_ARG,
da5b307a 103 RID_EXTENSION, RID_IMAGPART, RID_REALPART, RID_LABEL, RID_CHOOSE_EXPR,
f90e8e2e 104 RID_TYPES_COMPATIBLE_P, RID_BUILTIN_COMPLEX, RID_BUILTIN_SHUFFLE,
9a8ce21f 105 RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128,
74893f25 106 RID_FRACT, RID_ACCUM, RID_AUTO_TYPE, RID_BUILTIN_CALL_WITH_STATIC_CHAIN,
0e5921e8 107
48b0b196 108 /* C11 */
433cc7b0 109 RID_ALIGNAS, RID_GENERIC,
d19fa6b5 110
eea1139b
ILT
111 /* This means to warn that this is a C++ keyword, and then treat it
112 as a normal identifier. */
113 RID_CXX_COMPAT_WARN,
114
0a35513e
AH
115 /* GNU transactional memory extension */
116 RID_TRANSACTION_ATOMIC, RID_TRANSACTION_RELAXED, RID_TRANSACTION_CANCEL,
117
0ba8a114
NS
118 /* Too many ways of getting the name of a function as a string */
119 RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, RID_C99_FUNCTION_NAME,
120
1973201f
NP
121 /* C++ (some of these are keywords in Objective-C as well, but only
122 if they appear after a '@') */
0e5921e8
ZW
123 RID_BOOL, RID_WCHAR, RID_CLASS,
124 RID_PUBLIC, RID_PRIVATE, RID_PROTECTED,
125 RID_TEMPLATE, RID_NULL, RID_CATCH,
126 RID_DELETE, RID_FALSE, RID_NAMESPACE,
c22cacf3
MS
127 RID_NEW, RID_OFFSETOF, RID_OPERATOR,
128 RID_THIS, RID_THROW, RID_TRUE,
129 RID_TRY, RID_TYPENAME, RID_TYPEID,
b6baa67d 130 RID_USING, RID_CHAR16, RID_CHAR32,
0e5921e8
ZW
131
132 /* casts */
133 RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST,
134
cb68ec50 135 /* C++ extensions */
b3908fcc 136 RID_BASES, RID_DIRECT_BASES,
cb68ec50
PC
137 RID_HAS_NOTHROW_ASSIGN, RID_HAS_NOTHROW_CONSTRUCTOR,
138 RID_HAS_NOTHROW_COPY, RID_HAS_TRIVIAL_ASSIGN,
139 RID_HAS_TRIVIAL_CONSTRUCTOR, RID_HAS_TRIVIAL_COPY,
140 RID_HAS_TRIVIAL_DESTRUCTOR, RID_HAS_VIRTUAL_DESTRUCTOR,
141 RID_IS_ABSTRACT, RID_IS_BASE_OF,
8d0cf15e 142 RID_IS_CLASS,
cb68ec50 143 RID_IS_EMPTY, RID_IS_ENUM,
b3908fcc
JW
144 RID_IS_FINAL, RID_IS_LITERAL_TYPE,
145 RID_IS_POD, RID_IS_POLYMORPHIC,
146 RID_IS_STD_LAYOUT, RID_IS_TRIVIAL,
dd5d5481 147 RID_IS_TRIVIALLY_ASSIGNABLE, RID_IS_TRIVIALLY_CONSTRUCTIBLE,
b752325e 148 RID_IS_TRIVIALLY_COPYABLE,
b3908fcc 149 RID_IS_UNION, RID_UNDERLYING_TYPE,
cb68ec50 150
b3908fcc 151 /* C++11 */
0a766368 152 RID_CONSTEXPR, RID_DECLTYPE, RID_NOEXCEPT, RID_NULLPTR, RID_STATIC_ASSERT,
218f0015 153
939b37da 154 /* Cilk Plus keywords. */
9a771876 155 RID_CILK_SPAWN, RID_CILK_SYNC, RID_CILK_FOR,
939b37da 156
1973201f
NP
157 /* Objective-C ("AT" reserved words - they are only keywords when
158 they follow '@') */
3a3589b4 159 RID_AT_ENCODE, RID_AT_END,
0e5921e8 160 RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS,
c37d8c30 161 RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC, RID_AT_PACKAGE,
c22cacf3 162 RID_AT_PROTOCOL, RID_AT_SELECTOR,
264fa2db 163 RID_AT_THROW, RID_AT_TRY, RID_AT_CATCH,
92902b1b 164 RID_AT_FINALLY, RID_AT_SYNCHRONIZED,
668ea4b1 165 RID_AT_OPTIONAL, RID_AT_REQUIRED, RID_AT_PROPERTY,
da57d1b9 166 RID_AT_SYNTHESIZE, RID_AT_DYNAMIC,
264fa2db 167 RID_AT_INTERFACE,
0e5921e8
ZW
168 RID_AT_IMPLEMENTATION,
169
36c5e70a
BE
170 /* Named address support, mapping the keyword to a particular named address
171 number. Named address space 0 is reserved for the generic address. If
172 there are more than 254 named addresses, the addr_space_t type will need
173 to be grown from an unsigned char to unsigned short. */
174 RID_ADDR_SPACE_0, /* generic address */
175 RID_ADDR_SPACE_1,
176 RID_ADDR_SPACE_2,
177 RID_ADDR_SPACE_3,
178 RID_ADDR_SPACE_4,
179 RID_ADDR_SPACE_5,
180 RID_ADDR_SPACE_6,
181 RID_ADDR_SPACE_7,
182 RID_ADDR_SPACE_8,
183 RID_ADDR_SPACE_9,
184 RID_ADDR_SPACE_10,
185 RID_ADDR_SPACE_11,
186 RID_ADDR_SPACE_12,
187 RID_ADDR_SPACE_13,
188 RID_ADDR_SPACE_14,
189 RID_ADDR_SPACE_15,
190
191 RID_FIRST_ADDR_SPACE = RID_ADDR_SPACE_0,
192 RID_LAST_ADDR_SPACE = RID_ADDR_SPACE_15,
193
78a7c317
DD
194 /* __intN keywords. The _N_M here doesn't correspond to the intN
195 in the keyword; use the bitsize in int_n_t_data_t[M] for that.
196 For example, if int_n_t_data_t[0].bitsize is 13, then RID_INT_N_0
197 is for __int13. */
198
199 /* Note that the range to use is RID_FIRST_INT_N through
200 RID_FIRST_INT_N + NUM_INT_N_ENTS - 1 and c-parser.c has a list of
201 all RID_INT_N_* in a case statement. */
202
203 RID_INT_N_0,
204 RID_INT_N_1,
205 RID_INT_N_2,
206 RID_INT_N_3,
207
208 RID_FIRST_INT_N = RID_INT_N_0,
209 RID_LAST_INT_N = RID_INT_N_3,
210
0e5921e8
ZW
211 RID_MAX,
212
213 RID_FIRST_MODIFIER = RID_STATIC,
b8363a24
ZW
214 RID_LAST_MODIFIER = RID_ONEWAY,
215
36a85135
JM
216 RID_FIRST_CXX11 = RID_CONSTEXPR,
217 RID_LAST_CXX11 = RID_STATIC_ASSERT,
b8363a24
ZW
218 RID_FIRST_AT = RID_AT_ENCODE,
219 RID_LAST_AT = RID_AT_IMPLEMENTATION,
220 RID_FIRST_PQ = RID_IN,
668ea4b1 221 RID_LAST_PQ = RID_ONEWAY,
200290f2
NP
222 RID_FIRST_PATTR = RID_GETTER,
223 RID_LAST_PATTR = RID_NONATOMIC
f09f1de5
MM
224};
225
b8363a24 226#define OBJC_IS_AT_KEYWORD(rid) \
3f75a254
JM
227 ((unsigned int) (rid) >= (unsigned int) RID_FIRST_AT && \
228 (unsigned int) (rid) <= (unsigned int) RID_LAST_AT)
b8363a24
ZW
229
230#define OBJC_IS_PQ_KEYWORD(rid) \
3f75a254
JM
231 ((unsigned int) (rid) >= (unsigned int) RID_FIRST_PQ && \
232 (unsigned int) (rid) <= (unsigned int) RID_LAST_PQ)
b8363a24 233
668ea4b1
IS
234#define OBJC_IS_PATTR_KEYWORD(rid) \
235 ((unsigned int) (rid) >= (unsigned int) RID_FIRST_PATTR && \
236 (unsigned int) (rid) <= (unsigned int) RID_LAST_PATTR)
237
1973201f
NP
238/* OBJC_IS_CXX_KEYWORD recognizes the 'CXX_OBJC' keywords (such as
239 'class') which are shared in a subtle way between Objective-C and
240 C++. When the lexer is lexing in Objective-C/Objective-C++, if it
241 finds '@' followed by one of these identifiers (eg, '@class'), it
242 recognizes the whole as an Objective-C keyword. If the identifier
243 is found elsewhere, it follows the rules of the C/C++ language.
244 */
245#define OBJC_IS_CXX_KEYWORD(rid) \
246 (rid == RID_CLASS \
247 || rid == RID_PUBLIC || rid == RID_PROTECTED || rid == RID_PRIVATE \
248 || rid == RID_TRY || rid == RID_THROW || rid == RID_CATCH)
249
f09f1de5
MM
250/* The elements of `ridpointers' are identifier nodes for the reserved
251 type names and storage classes. It is indexed by a RID_... value. */
3f75a254 252extern GTY ((length ("(int) RID_MAX"))) tree *ridpointers;
f09f1de5 253
7f4edbcb
BS
254/* Standard named or nameless data types of the C compiler. */
255
256enum c_tree_index
257{
b6baa67d
KVH
258 CTI_CHAR16_TYPE,
259 CTI_CHAR32_TYPE,
7f4edbcb 260 CTI_WCHAR_TYPE,
207bf79d 261 CTI_UNDERLYING_WCHAR_TYPE,
c5ab7f91 262 CTI_WINT_TYPE,
cd732418
JM
263 CTI_SIGNED_SIZE_TYPE, /* For format checking only. */
264 CTI_UNSIGNED_PTRDIFF_TYPE, /* For format checking only. */
b15ad712
JM
265 CTI_INTMAX_TYPE,
266 CTI_UINTMAX_TYPE,
7f4edbcb
BS
267 CTI_WIDEST_INT_LIT_TYPE,
268 CTI_WIDEST_UINT_LIT_TYPE,
269
207bf79d
JM
270 /* Types for <stdint.h>, that may not be defined on all
271 targets. */
272 CTI_SIG_ATOMIC_TYPE,
273 CTI_INT8_TYPE,
274 CTI_INT16_TYPE,
275 CTI_INT32_TYPE,
276 CTI_INT64_TYPE,
277 CTI_UINT8_TYPE,
278 CTI_UINT16_TYPE,
279 CTI_UINT32_TYPE,
280 CTI_UINT64_TYPE,
281 CTI_INT_LEAST8_TYPE,
282 CTI_INT_LEAST16_TYPE,
283 CTI_INT_LEAST32_TYPE,
284 CTI_INT_LEAST64_TYPE,
285 CTI_UINT_LEAST8_TYPE,
286 CTI_UINT_LEAST16_TYPE,
287 CTI_UINT_LEAST32_TYPE,
288 CTI_UINT_LEAST64_TYPE,
289 CTI_INT_FAST8_TYPE,
290 CTI_INT_FAST16_TYPE,
291 CTI_INT_FAST32_TYPE,
292 CTI_INT_FAST64_TYPE,
293 CTI_UINT_FAST8_TYPE,
294 CTI_UINT_FAST16_TYPE,
295 CTI_UINT_FAST32_TYPE,
296 CTI_UINT_FAST64_TYPE,
297 CTI_INTPTR_TYPE,
298 CTI_UINTPTR_TYPE,
299
7f4edbcb 300 CTI_CHAR_ARRAY_TYPE,
b6baa67d
KVH
301 CTI_CHAR16_ARRAY_TYPE,
302 CTI_CHAR32_ARRAY_TYPE,
7f4edbcb 303 CTI_WCHAR_ARRAY_TYPE,
7f4edbcb
BS
304 CTI_STRING_TYPE,
305 CTI_CONST_STRING_TYPE,
306
19552aa5 307 /* Type for boolean expressions (bool in C++, int in C). */
de7df9eb
JM
308 CTI_TRUTHVALUE_TYPE,
309 CTI_TRUTHVALUE_TRUE,
310 CTI_TRUTHVALUE_FALSE,
311
7f4edbcb 312 CTI_DEFAULT_FUNCTION_TYPE,
7f4edbcb 313
2ba84f36 314 /* These are not types, but we have to look them up all the time. */
0ba8a114
NS
315 CTI_FUNCTION_NAME_DECL,
316 CTI_PRETTY_FUNCTION_NAME_DECL,
317 CTI_C99_FUNCTION_NAME_DECL,
318 CTI_SAVED_FUNCTION_NAME_DECLS,
c22cacf3 319
b2f97e4a
MM
320 CTI_NULL,
321
7f4edbcb
BS
322 CTI_MAX
323};
324
5950c3c9
BE
325#define C_CPP_HASHNODE(id) \
326 (&(((struct c_common_identifier *) (id))->node))
d75d71e0
ILT
327#define C_RID_CODE(id) \
328 ((enum rid) (((struct c_common_identifier *) (id))->node.rid_code))
329#define C_SET_RID_CODE(id, code) \
330 (((struct c_common_identifier *) (id))->node.rid_code = (unsigned char) code)
2a967f3d
NB
331
332/* Identifier part common to the C front ends. Inherits from
333 tree_identifier, despite appearances. */
d1b38208 334struct GTY(()) c_common_identifier {
4f60111f 335 struct tree_common common;
17211ab5 336 struct cpp_hashnode node;
2a967f3d
NB
337};
338
eea1139b
ILT
339/* An entry in the reserved keyword table. */
340
341struct c_common_resword
342{
343 const char *const word;
344 ENUM_BITFIELD(rid) const rid : 16;
345 const unsigned int disable : 16;
346};
347
8fba1830
BRF
348/* Mode used to build pointers (VOIDmode means ptr_mode). */
349
350extern machine_mode c_default_pointer_mode;
351
34429675
JM
352/* Extra cpp_ttype values for C++. */
353
34429675
JM
354/* A token type for template-ids. If a template-id is processed while
355 parsing tentatively, it is replaced with a CPP_TEMPLATE_ID token;
356 the value of the CPP_TEMPLATE_ID is whatever was returned by
357 cp_parser_template_id. */
358#define CPP_TEMPLATE_ID ((enum cpp_ttype) (CPP_KEYWORD + 1))
359
360/* A token type for nested-name-specifiers. If a
361 nested-name-specifier is processed while parsing tentatively, it is
362 replaced with a CPP_NESTED_NAME_SPECIFIER token; the value of the
363 CPP_NESTED_NAME_SPECIFIER is whatever was returned by
364 cp_parser_nested_name_specifier_opt. */
365#define CPP_NESTED_NAME_SPECIFIER ((enum cpp_ttype) (CPP_TEMPLATE_ID + 1))
366
367/* A token type for pre-parsed C++0x decltype. */
368#define CPP_DECLTYPE ((enum cpp_ttype) (CPP_NESTED_NAME_SPECIFIER + 1))
369
5f83e90b
JM
370/* A token type for pre-parsed primary-expression (lambda- or statement-). */
371#define CPP_PREPARSED_EXPR ((enum cpp_ttype) (CPP_DECLTYPE + 1))
372
34429675 373/* The number of token types, including C++-specific ones. */
5f83e90b 374#define N_CP_TTYPES ((int) (CPP_PREPARSED_EXPR + 1))
34429675 375
eea1139b
ILT
376/* Disable mask. Keywords are disabled if (reswords[i].disable &
377 mask) is _true_. Thus for keywords which are present in all
378 languages the disable field is zero. */
379
380#define D_CONLY 0x001 /* C only (not in C++). */
381#define D_CXXONLY 0x002 /* C++ only (not in C). */
382#define D_C99 0x004 /* In C, C99 only. */
36a85135 383#define D_CXX11 0x008 /* In C++, C++11 only. */
eea1139b
ILT
384#define D_EXT 0x010 /* GCC extension. */
385#define D_EXT89 0x020 /* GCC extension incorporated in C99. */
386#define D_ASM 0x040 /* Disabled by -fno-asm. */
387#define D_OBJC 0x080 /* In Objective C and neither C nor C++. */
388#define D_CXX_OBJC 0x100 /* In Objective C, and C++, but not C. */
389#define D_CXXWARN 0x200 /* In C warn with -Wcxx-compat. */
390
391/* The reserved keyword table. */
392extern const struct c_common_resword c_common_reswords[];
393
394/* The number of items in the reserved keyword table. */
395extern const unsigned int num_c_common_reswords;
396
b6baa67d
KVH
397#define char16_type_node c_global_trees[CTI_CHAR16_TYPE]
398#define char32_type_node c_global_trees[CTI_CHAR32_TYPE]
7f4edbcb 399#define wchar_type_node c_global_trees[CTI_WCHAR_TYPE]
207bf79d 400#define underlying_wchar_type_node c_global_trees[CTI_UNDERLYING_WCHAR_TYPE]
c5ab7f91 401#define wint_type_node c_global_trees[CTI_WINT_TYPE]
cd732418
JM
402#define signed_size_type_node c_global_trees[CTI_SIGNED_SIZE_TYPE]
403#define unsigned_ptrdiff_type_node c_global_trees[CTI_UNSIGNED_PTRDIFF_TYPE]
b15ad712
JM
404#define intmax_type_node c_global_trees[CTI_INTMAX_TYPE]
405#define uintmax_type_node c_global_trees[CTI_UINTMAX_TYPE]
7f4edbcb
BS
406#define widest_integer_literal_type_node c_global_trees[CTI_WIDEST_INT_LIT_TYPE]
407#define widest_unsigned_literal_type_node c_global_trees[CTI_WIDEST_UINT_LIT_TYPE]
408
207bf79d
JM
409#define sig_atomic_type_node c_global_trees[CTI_SIG_ATOMIC_TYPE]
410#define int8_type_node c_global_trees[CTI_INT8_TYPE]
411#define int16_type_node c_global_trees[CTI_INT16_TYPE]
412#define int32_type_node c_global_trees[CTI_INT32_TYPE]
413#define int64_type_node c_global_trees[CTI_INT64_TYPE]
414#define uint8_type_node c_global_trees[CTI_UINT8_TYPE]
ac868f29 415#define c_uint16_type_node c_global_trees[CTI_UINT16_TYPE]
207bf79d
JM
416#define c_uint32_type_node c_global_trees[CTI_UINT32_TYPE]
417#define c_uint64_type_node c_global_trees[CTI_UINT64_TYPE]
418#define int_least8_type_node c_global_trees[CTI_INT_LEAST8_TYPE]
419#define int_least16_type_node c_global_trees[CTI_INT_LEAST16_TYPE]
420#define int_least32_type_node c_global_trees[CTI_INT_LEAST32_TYPE]
421#define int_least64_type_node c_global_trees[CTI_INT_LEAST64_TYPE]
422#define uint_least8_type_node c_global_trees[CTI_UINT_LEAST8_TYPE]
423#define uint_least16_type_node c_global_trees[CTI_UINT_LEAST16_TYPE]
424#define uint_least32_type_node c_global_trees[CTI_UINT_LEAST32_TYPE]
425#define uint_least64_type_node c_global_trees[CTI_UINT_LEAST64_TYPE]
426#define int_fast8_type_node c_global_trees[CTI_INT_FAST8_TYPE]
427#define int_fast16_type_node c_global_trees[CTI_INT_FAST16_TYPE]
428#define int_fast32_type_node c_global_trees[CTI_INT_FAST32_TYPE]
429#define int_fast64_type_node c_global_trees[CTI_INT_FAST64_TYPE]
430#define uint_fast8_type_node c_global_trees[CTI_UINT_FAST8_TYPE]
431#define uint_fast16_type_node c_global_trees[CTI_UINT_FAST16_TYPE]
432#define uint_fast32_type_node c_global_trees[CTI_UINT_FAST32_TYPE]
433#define uint_fast64_type_node c_global_trees[CTI_UINT_FAST64_TYPE]
434#define intptr_type_node c_global_trees[CTI_INTPTR_TYPE]
435#define uintptr_type_node c_global_trees[CTI_UINTPTR_TYPE]
436
de7df9eb
JM
437#define truthvalue_type_node c_global_trees[CTI_TRUTHVALUE_TYPE]
438#define truthvalue_true_node c_global_trees[CTI_TRUTHVALUE_TRUE]
439#define truthvalue_false_node c_global_trees[CTI_TRUTHVALUE_FALSE]
19552aa5 440
7f4edbcb 441#define char_array_type_node c_global_trees[CTI_CHAR_ARRAY_TYPE]
b6baa67d
KVH
442#define char16_array_type_node c_global_trees[CTI_CHAR16_ARRAY_TYPE]
443#define char32_array_type_node c_global_trees[CTI_CHAR32_ARRAY_TYPE]
7f4edbcb 444#define wchar_array_type_node c_global_trees[CTI_WCHAR_ARRAY_TYPE]
7f4edbcb
BS
445#define string_type_node c_global_trees[CTI_STRING_TYPE]
446#define const_string_type_node c_global_trees[CTI_CONST_STRING_TYPE]
447
448#define default_function_type c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
7f4edbcb 449
0ba8a114
NS
450#define function_name_decl_node c_global_trees[CTI_FUNCTION_NAME_DECL]
451#define pretty_function_name_decl_node c_global_trees[CTI_PRETTY_FUNCTION_NAME_DECL]
452#define c99_function_name_decl_node c_global_trees[CTI_C99_FUNCTION_NAME_DECL]
453#define saved_function_name_decls c_global_trees[CTI_SAVED_FUNCTION_NAME_DECLS]
63ad61ed 454
b2f97e4a
MM
455/* The node for C++ `__null'. */
456#define null_node c_global_trees[CTI_NULL]
457
e2500fed 458extern GTY(()) tree c_global_trees[CTI_MAX];
ab76ca54 459
e0a21ab9
KH
460/* In a RECORD_TYPE, a sorted array of the fields of the type, not a
461 tree for size reasons. */
766090c2 462struct GTY(()) sorted_fields_type {
d07605f5
AP
463 int len;
464 tree GTY((length ("%h.len"))) elts[1];
465};
466
8f17b5c5
MM
467/* Mark which labels are explicitly declared.
468 These may be shadowed, and may be referenced from nested functions. */
469#define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
470
ab76ca54
MM
471typedef enum c_language_kind
472{
d73326ca 473 clk_c = 0, /* C90, C94, C99 or C11 */
37fa72e9
NB
474 clk_objc = 1, /* clk_c with ObjC features. */
475 clk_cxx = 2, /* ANSI/ISO C++ */
476 clk_objcxx = 3 /* clk_cxx with ObjC features. */
21c7361e 477}
ab76ca54
MM
478c_language_kind;
479
37fa72e9
NB
480/* To test for a specific language use c_language, defined by each
481 front end. For "ObjC features" or "not C++" use the macros. */
482extern c_language_kind c_language;
483
15a15e8d
RH
484#define c_dialect_cxx() ((c_language & clk_cxx) != 0)
485#define c_dialect_objc() ((c_language & clk_objc) != 0)
37fa72e9 486
dd865ef6
SZ
487/* The various name of operator that appears in error messages. */
488typedef enum ref_operator {
489 /* NULL */
490 RO_NULL,
491 /* array indexing */
492 RO_ARRAY_INDEXING,
493 /* unary * */
494 RO_UNARY_STAR,
495 /* -> */
496 RO_ARROW,
497 /* implicit conversion */
5e54f81d
MG
498 RO_IMPLICIT_CONVERSION,
499 /* ->* */
500 RO_ARROW_STAR
dd865ef6
SZ
501} ref_operator;
502
ae499cce
MM
503/* Information about a statement tree. */
504
d1b38208 505struct GTY(()) stmt_tree_s {
38e01f9e 506 /* A stack of statement lists being collected. */
9771b263 507 vec<tree, va_gc> *x_cur_stmt_list;
325c3691 508
da7d8304 509 /* In C++, Nonzero if we should treat statements as full
04f7a48e 510 expressions. In particular, this variable is non-zero if at the
ae499cce
MM
511 end of a statement we should destroy any temporaries created
512 during that statement. Similarly, if, at the end of a block, we
513 should destroy any local variables in this block. Normally, this
da7d8304 514 variable is nonzero, since those are the normal semantics of
ae499cce
MM
515 C++.
516
ae499cce 517 This flag has no effect in C. */
21c7361e 518 int stmts_are_full_exprs_p;
ae499cce
MM
519};
520
521typedef struct stmt_tree_s *stmt_tree;
522
523/* Global state pertinent to the current function. Some C dialects
524 extend this structure with additional fields. */
525
d1b38208 526struct GTY(()) c_language_function {
ae499cce
MM
527 /* While we are parsing the function, this contains information
528 about the statement-tree that we are building. */
529 struct stmt_tree_s x_stmt_tree;
3797cb21
DS
530
531 /* Vector of locally defined typedefs, for
532 -Wunused-local-typedefs. */
9771b263 533 vec<tree, va_gc> *local_typedefs;
ae499cce
MM
534};
535
38e01f9e
NF
536#define stmt_list_stack (current_stmt_tree ()->x_cur_stmt_list)
537
35fd3193 538/* When building a statement-tree, this is the current statement list
9771b263
DN
539 being collected. */
540#define cur_stmt_list (stmt_list_stack->last ())
38e01f9e 541
9771b263 542#define building_stmt_list_p() (stmt_list_stack && !stmt_list_stack->is_empty())
8f17b5c5
MM
543
544/* Language-specific hooks. */
545
4684cd27
MM
546/* If non-NULL, this function is called after a precompile header file
547 is loaded. */
548extern void (*lang_post_pch_load) (void);
549
f75fbaf7
ZW
550extern void push_file_scope (void);
551extern void pop_file_scope (void);
35b1a6fa 552extern stmt_tree current_stmt_tree (void);
325c3691 553extern tree push_stmt_list (void);
325c3691 554extern tree pop_stmt_list (tree);
35b1a6fa 555extern tree add_stmt (tree);
325c3691 556extern void push_cleanup (tree, tree, bool);
953ff289
DN
557extern tree pushdecl_top_level (tree);
558extern tree pushdecl (tree);
32e8bb8e 559extern tree build_modify_expr (location_t, tree, tree, enum tree_code,
c2255bc4 560 location_t, tree, tree);
36536d79
BI
561extern tree build_array_notation_expr (location_t, tree, tree, enum tree_code,
562 location_t, tree, tree);
563extern tree build_array_notation_ref (location_t, tree, tree, tree, tree, tree);
dd865ef6 564extern tree build_indirect_ref (location_t, tree, ref_operator);
35b1a6fa 565
d07605f5 566extern int field_decl_cmp (const void *, const void *);
c22cacf3
MS
567extern void resort_sorted_fields (void *, void *, gt_pointer_operator,
568 void *);
58f9752a 569extern bool has_c_linkage (const_tree decl);
17211ab5 570\f
4078b403
NB
571/* Switches common to the C front ends. */
572
63973df3
NB
573/* Nonzero means don't output line number information. */
574
575extern char flag_no_line_commands;
576
577/* Nonzero causes -E output not to be done, but directives such as
578 #define that have side effects are still obeyed. */
579
580extern char flag_no_output;
581
93d45d9e
JM
582/* Nonzero means dump macros in some fashion; contains the 'D', 'M',
583 'N' or 'U' of the command line switch. */
63973df3
NB
584
585extern char flag_dump_macros;
586
587/* Nonzero means pass #include lines through to the output. */
588
589extern char flag_dump_includes;
590
c0d578e6
GK
591/* Nonzero means process PCH files while preprocessing. */
592
593extern bool flag_pch_preprocess;
594
17211ab5
GK
595/* The file name to which we should write a precompiled header, or
596 NULL if no header will be written in this compile. */
597
598extern const char *pch_file;
599
3df89291
NB
600/* Nonzero if an ISO standard was selected. It rejects macros in the
601 user's namespace. */
17211ab5 602
3df89291
NB
603extern int flag_iso;
604
4078b403 605/* C/ObjC language option variables. */
b34c7881 606
2683ed8d 607
4078b403
NB
608/* Nonzero means allow type mismatches in conditional expressions;
609 just make their values `void'. */
74ff4629 610
4078b403 611extern int flag_cond_mismatch;
6c36d76b 612
eaf299c6 613/* Nonzero means enable C89 Amendment 1 features. */
b8458e3e
JM
614
615extern int flag_isoc94;
616
48b0b196 617/* Nonzero means use the ISO C99 (or C11) dialect of C. */
ab76ca54
MM
618
619extern int flag_isoc99;
620
48b0b196 621/* Nonzero means use the ISO C11 dialect of C. */
2778d766 622
48b0b196 623extern int flag_isoc11;
2778d766 624
6614fd40 625/* Nonzero means that we have builtin functions, and main is an int. */
93e2382f
JM
626
627extern int flag_hosted;
628
4078b403
NB
629/* ObjC language option variables. */
630
631
4078b403
NB
632/* Tells the compiler that this is a special run. Do not perform any
633 compiling, instead we are to test some platform dependent features
634 and output a C header file with appropriate definitions. */
635
636extern int print_struct_values;
637
abc88a08 638/* Tells the compiler what is the constant string class for ObjC. */
4078b403 639
fd350d24 640extern const char *constant_string_class_name;
4078b403 641
4078b403
NB
642
643/* C++ language option variables. */
644
645
62984918
JM
646/* Return TRUE if one of {flag_abi_version,flag_abi_compat_version} is
647 less than N and the other is at least N, for use by -Wabi. */
648#define abi_version_crosses(N) \
649 (abi_version_at_least(N) \
650 != (flag_abi_compat_version == 0 \
651 || flag_abi_compat_version >= (N)))
652
4078b403
NB
653/* Nonzero means generate separate instantiation control files and
654 juggle them at link time. */
655
656extern int flag_use_repository;
657
c1ae8be5
SM
658/* The supported C++ dialects. */
659
660enum cxx_dialect {
129211bc 661 cxx_unset,
97e3ad20 662 /* C++98 with TC1 */
c1ae8be5 663 cxx98,
97e3ad20
JM
664 cxx03 = cxx98,
665 /* C++11 */
666 cxx0x,
552b8185 667 cxx11 = cxx0x,
028aee17
JM
668 /* C++14 */
669 cxx14,
da73100b
JM
670 /* C++1z (C++17?) */
671 cxx1z
c1ae8be5 672};
966541e3 673
c1ae8be5
SM
674/* The C++ dialect being used. C++98 is the default. */
675extern enum cxx_dialect cxx_dialect;
966541e3 676
4078b403
NB
677/* Maximum template instantiation depth. This limit is rather
678 arbitrary, but it exists to limit the time it takes to notice
17bc631c 679 excessively recursive template instantiations. */
4078b403
NB
680
681extern int max_tinst_depth;
ab76ca54 682
7d882b83
ILT
683/* Nonzero means that we should not issue warnings about problems that
684 occur when the code is executed, because the code being processed
685 is not expected to be executed. This is set during parsing. This
686 is used for cases like sizeof() and "0 ? a : b". This is a count,
687 not a bool, because unexecuted expressions can nest. */
25587e40 688
7d882b83 689extern int c_inhibit_evaluation_warnings;
25587e40 690
148e4216
JM
691/* Whether lexing has been completed, so subsequent preprocessor
692 errors should use the compiler's input_location. */
693
694extern bool done_lexing;
695
ab76ca54
MM
696/* C types are partitioned into three subsets: object, function, and
697 incomplete types. */
698#define C_TYPE_OBJECT_P(type) \
699 (TREE_CODE (type) != FUNCTION_TYPE && TYPE_SIZE (type))
700
701#define C_TYPE_INCOMPLETE_P(type) \
702 (TREE_CODE (type) != FUNCTION_TYPE && TYPE_SIZE (type) == 0)
703
704#define C_TYPE_FUNCTION_P(type) \
705 (TREE_CODE (type) == FUNCTION_TYPE)
706
707/* For convenience we define a single macro to identify the class of
708 object or incomplete types. */
709#define C_TYPE_OBJECT_OR_INCOMPLETE_P(type) \
710 (!C_TYPE_FUNCTION_P (type))
711
c98cd5bf
JM
712struct visibility_flags
713{
714 unsigned inpragma : 1; /* True when in #pragma GCC visibility. */
715 unsigned inlines_hidden : 1; /* True when -finlineshidden in effect. */
716};
717
7a37fa90
MM
718/* These enumerators are possible types of unsafe conversions. */
719enum conversion_safety {
720 /* The conversion is safe. */
721 SAFE_CONVERSION = 0,
722 /* Another type of conversion with problems. */
723 UNSAFE_OTHER,
724 /* Conversion between signed and unsigned integers
725 which are all warned about immediately, so this is unused. */
726 UNSAFE_SIGN,
727 /* Conversions that reduce the precision of reals including conversions
728 from reals to integers. */
729 UNSAFE_REAL,
730 /* Conversions from complex to reals or integers, that discard imaginary
731 component. */
732 UNSAFE_IMAGINARY
733};
49b0aa18 734
c98cd5bf
JM
735/* Global visibility options. */
736extern struct visibility_flags visibility_options;
737
349ae713
NB
738/* Attribute table common to the C front ends. */
739extern const struct attribute_spec c_common_attribute_table[];
740extern const struct attribute_spec c_common_format_attribute_table[];
741
0ba8a114 742/* Pointer to function to lazily generate the VAR_DECL for __FUNCTION__ etc.
2ce07e2d
NS
743 ID is the identifier to use, NAME is the string.
744 TYPE_DEP indicates whether it depends on type of the function or not
745 (i.e. __PRETTY_FUNCTION__). */
746
c2255bc4 747extern tree (*make_fname_decl) (location_t, tree, int);
35b1a6fa 748
bffad7f1 749/* In c-decl.c and cp/tree.c. FIXME. */
3ef0694c 750extern void c_register_addr_space (const char *str, addr_space_t as);
bffad7f1
SB
751
752/* In c-common.c. */
5386338c 753extern bool in_late_binary_op;
36c5e70a 754extern const char *c_addr_space_name (addr_space_t as);
35b1a6fa 755extern tree identifier_global_value (tree);
3a636414 756extern tree c_linkage_bindings (tree);
35b1a6fa
AJ
757extern void record_builtin_type (enum rid, const char *, tree);
758extern tree build_void_list_node (void);
759extern void start_fname_decls (void);
760extern void finish_fname_decls (void);
761extern const char *fname_as_string (int);
3ba09659 762extern tree fname_decl (location_t, unsigned, tree);
35b1a6fa 763
d19fa6b5 764extern int check_user_alignment (const_tree, bool);
dde05067 765extern void check_function_arguments (const_tree, int, tree *);
35b1a6fa
AJ
766extern void check_function_arguments_recurse (void (*)
767 (void *, tree,
768 unsigned HOST_WIDE_INT),
769 void *, tree,
770 unsigned HOST_WIDE_INT);
83322951 771extern bool check_builtin_function_arguments (tree, int, tree *);
94a0dd7b 772extern void check_function_format (tree, int, tree *);
35b1a6fa
AJ
773extern tree handle_format_attribute (tree *, tree, tree, int, bool *);
774extern tree handle_format_arg_attribute (tree *, tree, tree, int, bool *);
564a129d 775extern bool attribute_takes_identifier_p (const_tree);
a4d8c676 776extern bool c_common_handle_option (size_t, const char *, int, int, location_t,
5f20c657 777 const struct cl_option_handlers *);
acce4e77 778extern bool default_handle_c_option (size_t, const char *, int);
ef4bddc2 779extern tree c_common_type_for_mode (machine_mode, int);
35b1a6fa 780extern tree c_common_type_for_size (unsigned int, int);
ab22c1fa
CF
781extern tree c_common_fixed_point_type_for_size (unsigned int, unsigned int,
782 int, int);
12753674 783extern tree c_common_unsigned_type (tree);
35b1a6fa
AJ
784extern tree c_common_signed_type (tree);
785extern tree c_common_signed_or_unsigned_type (int, tree);
81f653d6 786extern void c_common_init_ts (void);
38a4afee 787extern tree c_build_bitfield_integer_type (unsigned HOST_WIDE_INT, int);
68fca595
MP
788extern enum conversion_safety unsafe_conversion_p (location_t, tree, tree,
789 bool);
58f9752a 790extern bool decl_with_nonnull_addr_p (const_tree);
928c19bb
JM
791extern tree c_fully_fold (tree, bool, bool *);
792extern tree decl_constant_value_for_optimization (tree);
e5a94231 793extern tree c_wrap_maybe_const (tree, bool);
928c19bb 794extern tree c_save_expr (tree);
ba47d38d 795extern tree c_common_truthvalue_conversion (location_t, tree);
35b1a6fa 796extern void c_apply_type_quals_to_decl (int, tree);
296674db 797extern tree c_sizeof_or_alignof_type (location_t, tree, bool, bool, int);
c2255bc4 798extern tree c_alignof_expr (location_t, tree);
7f4edbcb
BS
799/* Print an error message for invalid operands to arith operation CODE.
800 NOP_EXPR is used as a special case (see truthvalue_conversion). */
ba47d38d 801extern void binary_op_error (location_t, enum tree_code, tree, tree);
35b1a6fa 802extern tree fix_string_type (tree);
35b1a6fa 803extern void constant_expression_warning (tree);
393eda6a 804extern void constant_expression_error (tree);
79bedddc 805extern bool strict_aliasing_warning (tree, tree, tree);
3a785c97 806extern void sizeof_pointer_memaccess_warning (location_t *, tree,
9771b263 807 vec<tree, va_gc> *, tree *,
1a4049e7 808 bool (*) (tree, tree));
68fca595
MP
809extern void warnings_for_convert_and_check (location_t, tree, tree, tree);
810extern tree convert_and_check (location_t, tree, tree);
c2255bc4 811extern void overflow_warning (location_t, tree);
fd4116f4 812extern bool warn_if_unused_value (const_tree, location_t);
a243fb4a 813extern void warn_logical_operator (location_t, enum tree_code, tree,
ca409efd 814 enum tree_code, tree, enum tree_code, tree);
59ea0364 815extern void warn_logical_not_parentheses (location_t, enum tree_code, tree);
a1e45ff0 816extern void check_main_parameter_types (tree decl);
b2ca3702 817extern bool c_determine_visibility (tree);
0af94e6f 818extern bool vector_types_compatible_elements_p (tree, tree);
6ec637a4
JJ
819extern void mark_valid_location_for_stdc_pragma (bool);
820extern bool valid_location_for_stdc_pragma_p (void);
821extern void set_float_const_decimal64 (void);
822extern void clear_float_const_decimal64 (void);
823extern bool float_const_decimal64_p (void);
ab76ca54 824
a9aa2c3a
NF
825extern bool keyword_begins_type_specifier (enum rid);
826extern bool keyword_is_storage_class_specifier (enum rid);
827extern bool keyword_is_type_qualifier (enum rid);
ba9e6dd5 828extern bool keyword_is_decl_specifier (enum rid);
e28d52cf 829extern bool cxx_fundamental_alignment_p (unsigned);
f04dda30 830extern bool pointer_to_zero_sized_aggr_p (tree);
a9aa2c3a 831
296674db
JM
832#define c_sizeof(LOC, T) c_sizeof_or_alignof_type (LOC, T, true, false, 1)
833#define c_alignof(LOC, T) c_sizeof_or_alignof_type (LOC, T, false, false, 1)
7f4edbcb 834
6715192c
MLI
835/* Subroutine of build_binary_op, used for certain operations. */
836extern tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise);
837
7f4edbcb
BS
838/* Subroutine of build_binary_op, used for comparison operations.
839 See if the operands have both been converted from subword integer types
840 and, if so, perhaps change them both back to their original type. */
393e8e8b
MP
841extern tree shorten_compare (location_t, tree *, tree *, tree *,
842 enum tree_code *);
7f4edbcb 843
fd9b0f32
PC
844extern tree pointer_int_sum (location_t, enum tree_code, tree, tree,
845 bool = true);
50e60bc3
ZW
846
847/* Add qualifiers to a type, in the fashion for C. */
35b1a6fa 848extern tree c_build_qualified_type (tree, int);
50e60bc3 849
7f4edbcb
BS
850/* Build tree nodes and builtin functions common to both C and C++ language
851 frontends. */
35b1a6fa 852extern void c_common_nodes_and_builtins (void);
d3707adb 853
35b1a6fa 854extern void disable_builtin_function (const char *);
7d14c755 855
3b2db49f
MM
856extern void set_compound_literal_name (tree decl);
857
c2255bc4 858extern tree build_va_arg (location_t, tree, tree);
7e8176d7 859
c5fa0890 860extern const unsigned int c_family_lang_mask;
7a9bf9a4 861extern unsigned int c_common_option_lang_mask (void);
d723bb7c 862extern void c_common_diagnostics_set_defaults (diagnostic_context *);
7a9bf9a4 863extern bool c_common_complain_wrong_lang_p (const struct cl_option *);
a75bfaa6 864extern void c_common_init_options_struct (struct gcc_options *);
7a9bf9a4 865extern void c_common_init_options (unsigned int, struct cl_decoded_option *);
35b1a6fa
AJ
866extern bool c_common_post_options (const char **);
867extern bool c_common_init (void);
868extern void c_common_finish (void);
b37421c6 869extern void c_common_parse_file (void);
f8a36c78 870extern FILE *get_dump_info (int, int *);
4862826d 871extern alias_set_type c_common_get_alias_set (tree);
9649812a 872extern void c_register_builtin_type (tree, const char*);
58f9752a
KG
873extern bool c_promoting_integer_type_p (const_tree);
874extern int self_promoting_args_p (const_tree);
12ea3302 875extern tree strip_pointer_operator (tree);
ba992967 876extern tree strip_pointer_or_array_types (tree);
c5ff069d 877extern HOST_WIDE_INT c_common_to_target_charset (HOST_WIDE_INT);
d7e7759d 878
d1bd0ded
GK
879/* This is the basic parsing function. */
880extern void c_parse_file (void);
d1bd0ded 881
d7438551
AH
882extern void c_parse_final_cleanups (void);
883
d166d4c3 884extern void warn_for_omitted_condop (location_t, tree);
c5ff069d 885
ae499cce
MM
886/* These macros provide convenient access to the various _STMT nodes. */
887
325c3691
RH
888/* Nonzero if a given STATEMENT_LIST represents the outermost binding
889 if a statement expression. */
890#define STATEMENT_LIST_STMT_EXPR(NODE) \
891 TREE_LANG_FLAG_1 (STATEMENT_LIST_CHECK (NODE))
174283a3
RH
892
893/* Nonzero if a label has been added to the statement list. */
894#define STATEMENT_LIST_HAS_LABEL(NODE) \
895 TREE_LANG_FLAG_3 (STATEMENT_LIST_CHECK (NODE))
325c3691 896
928c19bb
JM
897/* C_MAYBE_CONST_EXPR accessors. */
898#define C_MAYBE_CONST_EXPR_PRE(NODE) \
899 TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 0)
900#define C_MAYBE_CONST_EXPR_EXPR(NODE) \
901 TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 1)
902#define C_MAYBE_CONST_EXPR_INT_OPERANDS(NODE) \
903 TREE_LANG_FLAG_0 (C_MAYBE_CONST_EXPR_CHECK (NODE))
904#define C_MAYBE_CONST_EXPR_NON_CONST(NODE) \
905 TREE_LANG_FLAG_1 (C_MAYBE_CONST_EXPR_CHECK (NODE))
906#define EXPR_INT_CONST_OPERANDS(EXPR) \
907 (INTEGRAL_TYPE_P (TREE_TYPE (EXPR)) \
908 && (TREE_CODE (EXPR) == INTEGER_CST \
909 || (TREE_CODE (EXPR) == C_MAYBE_CONST_EXPR \
910 && C_MAYBE_CONST_EXPR_INT_OPERANDS (EXPR))))
911
0a7394bc
MM
912/* In a FIELD_DECL, nonzero if the decl was originally a bitfield. */
913#define DECL_C_BIT_FIELD(NODE) \
914 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) == 1)
915#define SET_DECL_C_BIT_FIELD(NODE) \
916 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 1)
917#define CLEAR_DECL_C_BIT_FIELD(NODE) \
918 (DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
919
c2255bc4
AH
920extern tree do_case (location_t, tree, tree);
921extern tree build_stmt (location_t, enum tree_code, ...);
fb52b50a 922extern tree build_real_imag_expr (location_t, enum tree_code, tree);
f2c5f623 923
ab76ca54
MM
924/* These functions must be defined by each front-end which implements
925 a variant of the C language. They are used in c-common.c. */
926
c9f9eb5d 927extern tree build_unary_op (location_t, enum tree_code, tree, int);
ba47d38d 928extern tree build_binary_op (location_t, enum tree_code, tree, tree, int);
522ddfa2 929extern tree perform_integral_promotions (tree);
ab76ca54 930
d593cb3d
MS
931/* These functions must be defined by each front-end which implements
932 a variant of the C language. They are used by port files. */
933
934extern tree default_conversion (tree);
935
ab76ca54
MM
936/* Given two integer or real types, return the type for their sum.
937 Given two compatible ANSI C types, returns the merged type. */
938
35b1a6fa 939extern tree common_type (tree, tree);
44835fdd 940
35b1a6fa 941extern tree decl_constant_value (tree);
56cb9733 942
19552aa5 943/* Handle increment and decrement of boolean types. */
35b1a6fa 944extern tree boolean_increment (enum tree_code, tree);
19552aa5 945
35b1a6fa 946extern int case_compare (splay_tree_key, splay_tree_key);
8f17b5c5 947
b155cfd9
MP
948extern tree c_add_case_label (location_t, splay_tree, tree, tree, tree, tree,
949 bool *);
8f17b5c5 950
b155cfd9
MP
951extern void c_do_switch_warnings (splay_tree, location_t, tree, tree, bool,
952 bool);
6de9cd9a 953
c2255bc4 954extern tree build_function_call (location_t, tree, tree);
c70eaeaf 955
81e5eca8
MP
956extern tree build_function_call_vec (location_t, vec<location_t>, tree,
957 vec<tree, va_gc> *, vec<tree, va_gc> *);
bbbbb16a 958
9771b263 959extern tree resolve_overloaded_builtin (location_t, tree, vec<tree, va_gc> *);
48ae6c13 960
6a3799eb 961extern tree finish_label_address_expr (tree, location_t);
15b732b2
NB
962
963/* Same function prototype, but the C and C++ front ends have
964 different implementations. Used in c-common.c. */
35b1a6fa 965extern tree lookup_label (tree);
10e6657a 966extern tree lookup_name (tree);
1e4ae551 967extern bool lvalue_p (const_tree);
15b732b2 968
f83c7f63 969extern bool vector_targets_convertible_p (const_tree t1, const_tree t2);
58f9752a 970extern bool vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note);
bedc293e 971extern tree c_build_vec_perm_expr (location_t, tree, tree, tree, bool = true);
cc27e657 972
35b1a6fa 973extern void init_c_lex (void);
81a75f0f 974
35b1a6fa 975extern void c_cpp_builtins (cpp_reader *);
ab442df7 976extern void c_cpp_builtins_optimize_pragma (cpp_reader *, tree, tree);
59cc9210
SB
977extern bool c_cpp_error (cpp_reader *, int, int, location_t, unsigned int,
978 const char *, va_list *)
979 ATTRIBUTE_GCC_DIAG(6,0);
1f8d3e84 980extern int c_common_has_attribute (cpp_reader *);
76c3e73e 981
7c475d11
JM
982extern bool parse_optimize_options (tree, bool);
983
731e8b38
MM
984/* Positive if an implicit `extern "C"' scope has just been entered;
985 negative if such a scope has just been exited. */
7876228d 986extern GTY(()) int pending_lang_change;
731e8b38 987
0e5921e8
ZW
988/* Information recorded about each file examined during compilation. */
989
990struct c_fileinfo
991{
992 int time; /* Time spent in the file. */
5d709b00
ZW
993
994 /* Flags used only by C++.
995 INTERFACE_ONLY nonzero means that we are in an "interface" section
996 of the compiler. INTERFACE_UNKNOWN nonzero means we cannot trust
997 the value of INTERFACE_ONLY. If INTERFACE_UNKNOWN is zero and
998 INTERFACE_ONLY is zero, it means that we are responsible for
999 exporting definitions that others might need. */
1000 short interface_only;
0e5921e8
ZW
1001 short interface_unknown;
1002};
1003
35b1a6fa
AJ
1004struct c_fileinfo *get_fileinfo (const char *);
1005extern void dump_time_statistics (void);
1006
1007extern bool c_dump_tree (void *, tree);
1008
3a5b9284
RH
1009extern void verify_sequence_points (tree);
1010
cf9e9959
EB
1011extern tree fold_offsetof_1 (tree);
1012extern tree fold_offsetof (tree);
ee8a6a3e 1013
5ae9ba3e 1014/* Places where an lvalue, or modifiable lvalue, may be required.
37dc0d8d 1015 Used to select diagnostic messages in lvalue_error and
5ae9ba3e
MM
1016 readonly_error. */
1017enum lvalue_use {
1018 lv_assign,
1019 lv_increment,
1020 lv_decrement,
1021 lv_addressof,
1022 lv_asm
1023};
1024
c02065fc 1025extern void readonly_error (location_t, tree, enum lvalue_use);
7bd11157 1026extern void lvalue_error (location_t, enum lvalue_use);
7a6daeb0 1027extern void invalid_indirection_error (location_t, tree, ref_operator);
5ae9ba3e 1028
aab038d5
RH
1029extern int complete_array_type (tree *, tree, bool);
1030
48ae6c13
RH
1031extern tree builtin_type_for_size (int, bool);
1032
30cd1c5d
AS
1033extern void c_common_mark_addressable_vec (tree);
1034
5bd012f8 1035extern void warn_array_subscript_with_type_char (location_t, tree);
5d9de0d0
PC
1036extern void warn_about_parentheses (location_t,
1037 enum tree_code,
100d537d
MLI
1038 enum tree_code, tree,
1039 enum tree_code, tree);
c616e51b 1040extern void warn_for_unused_label (tree label);
c9f9eb5d 1041extern void warn_for_div_by_zero (location_t, tree divisor);
ba47d38d 1042extern void warn_for_sign_compare (location_t,
b8698a0f
L
1043 tree orig_op0, tree orig_op1,
1044 tree op0, tree op1,
1045 tree result_type,
2d12797c 1046 enum tree_code resultcode);
da2e71c9 1047extern void do_warn_unused_parameter (tree);
c5ee1358
MM
1048extern void do_warn_double_promotion (tree, tree, tree, const char *,
1049 location_t);
770e5a2e 1050extern void set_underlying_type (tree);
040d18b6 1051extern void record_types_used_by_current_var_decl (tree);
3797cb21
DS
1052extern void record_locally_defined_typedef (tree);
1053extern void maybe_record_typedef_use (tree);
1054extern void maybe_warn_unused_local_typedefs (void);
04159acf 1055extern void maybe_warn_bool_compare (location_t, enum tree_code, tree, tree);
9771b263
DN
1056extern vec<tree, va_gc> *make_tree_vector (void);
1057extern void release_tree_vector (vec<tree, va_gc> *);
1058extern vec<tree, va_gc> *make_tree_vector_single (tree);
1059extern vec<tree, va_gc> *make_tree_vector_from_list (tree);
1060extern vec<tree, va_gc> *make_tree_vector_copy (const vec<tree, va_gc> *);
2a67bec2 1061
793c625f
MG
1062/* Used for communication between c_common_type_for_mode and
1063 c_register_builtin_type. */
1064extern GTY(()) tree registered_builtin_types;
1065
7c34ced1 1066/* In c-gimplify.c */
6de9cd9a 1067extern void c_genericize (tree);
726a989a 1068extern int c_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
c2255bc4 1069extern tree c_build_bind_expr (location_t, tree, tree);
6de9cd9a 1070
c0d578e6 1071/* In c-pch.c */
35b1a6fa 1072extern void pch_init (void);
1efcb8c6 1073extern void pch_cpp_save_state (void);
35b1a6fa
AJ
1074extern int c_common_valid_pch (cpp_reader *pfile, const char *name, int fd);
1075extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd,
1076 const char *orig);
1077extern void c_common_write_pch (void);
18c81520 1078extern void c_common_no_more_pch (void);
bc4071dd 1079extern void c_common_pch_pragma (cpp_reader *pfile, const char *);
3fd30b88
GK
1080
1081/* In *-checksum.c */
1082extern const unsigned char executable_checksum[16];
c0d578e6 1083
ab442df7
MM
1084/* In c-cppbuiltin.c */
1085extern void builtin_define_std (const char *macro);
35b1a6fa 1086extern void builtin_define_with_value (const char *, const char *, int);
7049e4eb
CB
1087extern void builtin_define_with_int_value (const char *, HOST_WIDE_INT);
1088extern void builtin_define_type_sizeof (const char *, tree);
35b1a6fa 1089extern void c_stddef_cpp_builtins (void);
0e50b624 1090extern void fe_file_change (const line_map_ordinary *);
cfc93532 1091extern void c_parse_error (const char *, enum cpp_ttype, tree, unsigned char);
9d10c9a9
NB
1092
1093/* In c-ppoutput.c */
35b1a6fa
AJ
1094extern void init_pp_output (FILE *);
1095extern void preprocess_file (cpp_reader *);
0e50b624 1096extern void pp_file_change (const line_map_ordinary *);
8e9ea4d7 1097extern void pp_dir_change (cpp_reader *, const char *);
104f8784 1098extern bool check_missing_format_attribute (tree, tree);
17211ab5 1099
953ff289 1100/* In c-omp.c */
acf0174b
JJ
1101struct omp_clause_mask
1102{
1103 inline omp_clause_mask ();
8848828b
JJ
1104 inline omp_clause_mask (uint64_t l);
1105 inline omp_clause_mask (uint64_t l, uint64_t h);
acf0174b
JJ
1106 inline omp_clause_mask &operator &= (omp_clause_mask);
1107 inline omp_clause_mask &operator |= (omp_clause_mask);
1108 inline omp_clause_mask operator ~ () const;
1109 inline omp_clause_mask operator & (omp_clause_mask) const;
1110 inline omp_clause_mask operator | (omp_clause_mask) const;
1111 inline omp_clause_mask operator >> (int);
1112 inline omp_clause_mask operator << (int);
1113 inline bool operator == (omp_clause_mask) const;
acd15a28 1114 inline bool operator != (omp_clause_mask) const;
8848828b 1115 uint64_t low, high;
acf0174b
JJ
1116};
1117
1118inline
1119omp_clause_mask::omp_clause_mask ()
1120{
1121}
1122
1123inline
8848828b 1124omp_clause_mask::omp_clause_mask (uint64_t l)
acf0174b
JJ
1125: low (l), high (0)
1126{
1127}
1128
1129inline
8848828b 1130omp_clause_mask::omp_clause_mask (uint64_t l, uint64_t h)
acf0174b
JJ
1131: low (l), high (h)
1132{
1133}
1134
1135inline omp_clause_mask &
1136omp_clause_mask::operator &= (omp_clause_mask b)
1137{
1138 low &= b.low;
1139 high &= b.high;
1140 return *this;
1141}
1142
1143inline omp_clause_mask &
1144omp_clause_mask::operator |= (omp_clause_mask b)
1145{
1146 low |= b.low;
1147 high |= b.high;
1148 return *this;
1149}
1150
1151inline omp_clause_mask
1152omp_clause_mask::operator ~ () const
1153{
1154 omp_clause_mask ret (~low, ~high);
1155 return ret;
1156}
1157
1158inline omp_clause_mask
1159omp_clause_mask::operator | (omp_clause_mask b) const
1160{
1161 omp_clause_mask ret (low | b.low, high | b.high);
1162 return ret;
1163}
1164
1165inline omp_clause_mask
1166omp_clause_mask::operator & (omp_clause_mask b) const
1167{
1168 omp_clause_mask ret (low & b.low, high & b.high);
1169 return ret;
1170}
1171
1172inline omp_clause_mask
1173omp_clause_mask::operator << (int amount)
1174{
1175 omp_clause_mask ret;
8848828b 1176 if (amount >= 64)
acf0174b
JJ
1177 {
1178 ret.low = 0;
8848828b 1179 ret.high = low << (amount - 64);
acf0174b
JJ
1180 }
1181 else if (amount == 0)
1182 ret = *this;
1183 else
1184 {
1185 ret.low = low << amount;
8848828b 1186 ret.high = (low >> (64 - amount)) | (high << amount);
acf0174b
JJ
1187 }
1188 return ret;
1189}
1190
1191inline omp_clause_mask
1192omp_clause_mask::operator >> (int amount)
1193{
1194 omp_clause_mask ret;
8848828b 1195 if (amount >= 64)
acf0174b 1196 {
8848828b 1197 ret.low = high >> (amount - 64);
acf0174b
JJ
1198 ret.high = 0;
1199 }
1200 else if (amount == 0)
1201 ret = *this;
1202 else
1203 {
8848828b 1204 ret.low = (high << (64 - amount)) | (low >> amount);
acf0174b
JJ
1205 ret.high = high >> amount;
1206 }
1207 return ret;
1208}
1209
1210inline bool
1211omp_clause_mask::operator == (omp_clause_mask b) const
1212{
1213 return low == b.low && high == b.high;
1214}
1215
acd15a28
JJ
1216inline bool
1217omp_clause_mask::operator != (omp_clause_mask b) const
1218{
1219 return low != b.low || high != b.high;
1220}
1221
8848828b 1222#define OMP_CLAUSE_MASK_1 omp_clause_mask (1)
acf0174b
JJ
1223
1224enum c_omp_clause_split
1225{
1226 C_OMP_CLAUSE_SPLIT_TARGET = 0,
1227 C_OMP_CLAUSE_SPLIT_TEAMS,
1228 C_OMP_CLAUSE_SPLIT_DISTRIBUTE,
1229 C_OMP_CLAUSE_SPLIT_PARALLEL,
1230 C_OMP_CLAUSE_SPLIT_FOR,
1231 C_OMP_CLAUSE_SPLIT_SIMD,
1232 C_OMP_CLAUSE_SPLIT_COUNT,
1233 C_OMP_CLAUSE_SPLIT_SECTIONS = C_OMP_CLAUSE_SPLIT_FOR
1234};
1235
c2255bc4 1236extern tree c_finish_omp_master (location_t, tree);
acf0174b 1237extern tree c_finish_omp_taskgroup (location_t, tree);
c2255bc4
AH
1238extern tree c_finish_omp_critical (location_t, tree, tree);
1239extern tree c_finish_omp_ordered (location_t, tree);
1240extern void c_finish_omp_barrier (location_t);
20906c66 1241extern tree c_finish_omp_atomic (location_t, enum tree_code, enum tree_code,
acf0174b 1242 tree, tree, tree, tree, tree, bool, bool);
c2255bc4
AH
1243extern void c_finish_omp_flush (location_t);
1244extern void c_finish_omp_taskwait (location_t);
20906c66 1245extern void c_finish_omp_taskyield (location_t);
acf0174b
JJ
1246extern tree c_finish_omp_for (location_t, enum tree_code, tree, tree, tree,
1247 tree, tree, tree);
41dbbb37 1248extern tree c_finish_oacc_wait (location_t, tree, tree);
acf0174b
JJ
1249extern void c_omp_split_clauses (location_t, enum tree_code, omp_clause_mask,
1250 tree, tree *);
1251extern tree c_omp_declare_simd_clauses_to_numbers (tree, tree);
1252extern void c_omp_declare_simd_clauses_to_decls (tree, tree);
953ff289
DN
1253extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree);
1254
56300785
JJ
1255/* Return next tree in the chain for chain_next walking of tree nodes. */
1256static inline tree
1257c_tree_chain_next (tree t)
1258{
1259 /* TREE_CHAIN of a type is TYPE_STUB_DECL, which is different
1260 kind of object, never a long chain of nodes. Prefer
1261 TYPE_NEXT_VARIANT for types. */
1262 if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_TYPE_COMMON))
1263 return TYPE_NEXT_VARIANT (t);
1264 /* Otherwise, if there is TREE_CHAIN, return it. */
1265 if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_COMMON))
1266 return TREE_CHAIN (t);
1267 return NULL;
1268}
1269
0a35513e
AH
1270/* Mask used by tm_stmt_attr. */
1271#define TM_STMT_ATTR_OUTER 2
1272#define TM_STMT_ATTR_ATOMIC 4
1273#define TM_STMT_ATTR_RELAXED 8
1274
1275extern int parse_tm_stmt_attr (tree, int);
1276
1277/* Mask used by tm_attr_to_mask and tm_mask_to_attr. Note that these
1278 are ordered specifically such that more restrictive attributes are
1279 at lower bit positions. This fact is known by the C++ tm attribute
1280 inheritance code such that least bit extraction (mask & -mask) results
1281 in the most restrictive attribute. */
1282#define TM_ATTR_SAFE 1
1283#define TM_ATTR_CALLABLE 2
1284#define TM_ATTR_PURE 4
1285#define TM_ATTR_IRREVOCABLE 8
1286#define TM_ATTR_MAY_CANCEL_OUTER 16
1287
1288extern int tm_attr_to_mask (tree);
1289extern tree tm_mask_to_attr (int);
1290extern tree find_tm_attribute (tree);
1291
3ce4f9e4
ESR
1292/* A suffix-identifier value doublet that represents user-defined literals
1293 for C++-0x. */
2d7aa578
ESR
1294enum overflow_type {
1295 OT_UNDERFLOW = -1,
1296 OT_NONE,
1297 OT_OVERFLOW
1298};
1299
3ce4f9e4
ESR
1300struct GTY(()) tree_userdef_literal {
1301 struct tree_base base;
1302 tree suffix_id;
1303 tree value;
1304 tree num_string;
2d7aa578 1305 enum overflow_type overflow;
3ce4f9e4
ESR
1306};
1307
1308#define USERDEF_LITERAL_SUFFIX_ID(NODE) \
1309 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->suffix_id)
1310
1311#define USERDEF_LITERAL_VALUE(NODE) \
1312 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->value)
1313
2d7aa578
ESR
1314#define USERDEF_LITERAL_OVERFLOW(NODE) \
1315 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->overflow)
1316
3ce4f9e4
ESR
1317#define USERDEF_LITERAL_NUM_STRING(NODE) \
1318 (((struct tree_userdef_literal *)USERDEF_LITERAL_CHECK (NODE))->num_string)
1319
1320#define USERDEF_LITERAL_TYPE(NODE) \
1321 (TREE_TYPE (USERDEF_LITERAL_VALUE (NODE)))
1322
2d7aa578
ESR
1323extern tree build_userdef_literal (tree suffix_id, tree value,
1324 enum overflow_type overflow,
1325 tree num_string);
3ce4f9e4 1326
aa7da51a 1327extern bool convert_vector_to_pointer_for_subscript (location_t, tree *, tree);
7edaa4d2 1328
a212e43f
MG
1329/* Possibe cases of scalar_to_vector conversion. */
1330enum stv_conv {
688010ba 1331 stv_error, /* Error occurred. */
a212e43f
MG
1332 stv_nothing, /* Nothing happened. */
1333 stv_firstarg, /* First argument must be expanded. */
1334 stv_secondarg /* Second argument must be expanded. */
1335};
1336
1337extern enum stv_conv scalar_to_vector (location_t loc, enum tree_code code,
1338 tree op0, tree op1, bool);
1339
c02065fc
AH
1340/* In c-cilkplus.c */
1341extern tree c_finish_cilk_clauses (tree);
1342extern tree c_validate_cilk_plus_loop (tree *, int *, void *);
1343extern bool c_check_cilk_loop (location_t, tree);
1344
36536d79
BI
1345/* These #defines allow users to access different operands of the
1346 array notation tree. */
1347
1348#define ARRAY_NOTATION_CHECK(NODE) TREE_CHECK (NODE, ARRAY_NOTATION_REF)
1349#define ARRAY_NOTATION_ARRAY(NODE) \
1350 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 0)
1351#define ARRAY_NOTATION_START(NODE) \
1352 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 1)
1353#define ARRAY_NOTATION_LENGTH(NODE) \
1354 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 2)
1355#define ARRAY_NOTATION_STRIDE(NODE) \
1356 TREE_OPERAND (ARRAY_NOTATION_CHECK (NODE), 3)
1357
d60f1706
BI
1358/* This structure holds all the scalar values and its appropriate variable
1359 replacment. It is mainly used by the function that pulls all the invariant
1360 parts that should be executed only once, which comes with array notation
1361 expressions. */
1362struct inv_list
1363{
1364 vec<tree, va_gc> *list_values;
1365 vec<tree, va_gc> *replacement;
07a6825b 1366 vec<enum tree_code, va_gc> *additional_tcodes;
d60f1706
BI
1367};
1368
2ce86d2e
BI
1369/* This structure holds all the important components that can be extracted
1370 from an ARRAY_NOTATION_REF expression. It is used to pass array notation
1371 information between the functions that are responsible for expansion. */
1372typedef struct cilkplus_an_parts
1373{
1374 tree value;
1375 tree start;
1376 tree length;
1377 tree stride;
1378 bool is_vector;
1379} an_parts;
1380
1381/* This structure holds the components necessary to create the loop around
1382 the ARRAY_REF that is created using the ARRAY_NOTATION information. */
1383
1384typedef struct cilkplus_an_loop_parts
1385{
1386 tree var; /* Loop induction variable. */
1387 tree incr; /* Loop increment/decrement expression. */
1388 tree cmp; /* Loop condition. */
1389 tree ind_init; /* Initialization of the loop induction variable. */
1390} an_loop_parts;
1391
d60f1706
BI
1392/* In array-notation-common.c. */
1393extern HOST_WIDE_INT extract_sec_implicit_index_arg (location_t, tree);
36536d79
BI
1394extern bool is_sec_implicit_index_fn (tree);
1395extern void array_notation_init_builtins (void);
1396extern struct c_expr fix_array_notation_expr (location_t, enum tree_code,
1397 struct c_expr);
1398extern bool contains_array_notation_expr (tree);
1399extern tree expand_array_notation_exprs (tree);
1400extern tree fix_conditional_array_notations (tree);
1401extern tree find_correct_array_notation_type (tree);
713b46fa 1402extern bool length_mismatch_in_expr_p (location_t, vec<vec<an_parts> >);
d60f1706
BI
1403extern enum built_in_function is_cilkplus_reduce_builtin (tree);
1404extern bool find_rank (location_t, tree, tree, bool, size_t *);
1405extern void extract_array_notation_exprs (tree, bool, vec<tree, va_gc> **);
1406extern void replace_array_notations (tree *, bool, vec<tree, va_gc> *,
1407 vec<tree, va_gc> *);
1408extern tree find_inv_trees (tree *, int *, void *);
1409extern tree replace_inv_trees (tree *, int *, void *);
1410extern tree find_correct_array_notation_type (tree op);
2ce86d2e
BI
1411extern void cilkplus_extract_an_triplets (vec<tree, va_gc> *, size_t, size_t,
1412 vec<vec<an_parts> > *);
1413extern vec <tree, va_gc> *fix_sec_implicit_args
1414 (location_t, vec <tree, va_gc> *, vec<an_loop_parts>, size_t, tree);
939b37da
BI
1415
1416/* In cilk.c. */
1417extern tree insert_cilk_frame (tree);
1418extern void cilk_init_builtins (void);
12893402
BI
1419extern int gimplify_cilk_spawn (tree *);
1420extern void cilk_install_body_with_frame_cleanup (tree, tree, void *);
939b37da
BI
1421extern bool cilk_detect_spawn_and_unwrap (tree *);
1422extern bool cilk_set_spawn_marker (location_t, tree);
1423extern tree build_cilk_sync (void);
1424extern tree build_cilk_spawn (location_t, tree);
1425extern tree make_cilk_frame (tree);
1426extern tree create_cilk_function_exit (tree, bool, bool);
1427extern tree cilk_install_body_pedigree_operations (tree);
12893402 1428extern void cilk_outline (tree, tree *, void *);
3af9c5e9 1429extern bool contains_cilk_spawn_stmt (tree);
9a771876 1430extern tree cilk_for_number_of_iterations (tree);
e5e44252
AK
1431extern bool check_no_cilk (tree, const char *, const char *,
1432 location_t loc = UNKNOWN_LOCATION);
c3388e62
DM
1433/* In c-indentation.c. */
1434extern void
1435warn_for_misleading_indentation (location_t guard_loc,
1436 location_t body_loc,
1437 location_t next_stmt_loc,
1438 enum cpp_ttype next_tok_type,
1439 const char *guard_kind);
1440
88657302 1441#endif /* ! GCC_C_COMMON_H */