1 /* Front-end tree definitions for GNU compiler.
2 Copyright (C) 1989 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)
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 /* codes of tree nodes */
24 #define DEFTREECODE(SYM, STRING, TYPE, NARGS) SYM,
29 LAST_AND_UNUSED_TREE_CODE /* A convenient way to get a value for
35 /* Number of tree codes. */
36 #define NUM_TREE_CODES ((int)LAST_AND_UNUSED_TREE_CODE)
38 /* Indexed by enum tree_code, contains a character which is
39 `<' for a comparison expression, `1', for a unary arithmetic
40 expression, `2' for a binary arithmetic expression, `e' for
41 other types of expressions, `r' for a reference, `c' for a
42 constant, `d' for a decl, `t' for a type, `s' for a statement,
43 and `x' for anything else (TREE_LIST, IDENTIFIER, etc). */
45 extern char **tree_code_type;
46 #define TREE_CODE_CLASS(CODE) (*tree_code_type[(int) (CODE)])
48 /* Number of argument-words in each kind of tree-node. */
50 extern int *tree_code_length;
52 /* Names of tree components. */
54 extern char **tree_code_name;
56 /* Codes that identify the various built in functions
57 so that expand_call can identify them quickly. */
59 enum built_in_function
83 BUILT_IN_CLASSIFY_TYPE,
87 BUILT_IN_FRAME_ADDRESS,
88 BUILT_IN_RETURN_ADDRESS,
89 BUILT_IN_CALLER_RETURN_ADDRESS,
98 /* The definition of tree nodes fills the next several pages. */
100 /* A tree node can represent a data type, a variable, an expression
101 or a statement. Each node has a TREE_CODE which says what kind of
102 thing it represents. Some common codes are:
103 INTEGER_TYPE -- represents a type of integers.
104 ARRAY_TYPE -- represents a type of pointer.
105 VAR_DECL -- represents a declared variable.
106 INTEGER_CST -- represents a constant integer value.
107 PLUS_EXPR -- represents a sum (an expression).
109 As for the contents of a tree node: there are some fields
110 that all nodes share. Each TREE_CODE has various special-purpose
111 fields as well. The fields of a node are never accessed directly,
112 always through accessor macros. */
114 /* This type is used everywhere to refer to a tree node. */
116 typedef union tree_node *tree;
118 #define NULL_TREE (tree) NULL
120 /* Define a generic NULL if one hasn't already been defined. */
127 #define NULL_PTR (char *) NULL
130 /* Every kind of tree node starts with this structure,
131 so all nodes have these fields.
133 See the accessor macros, defined below, for documentation of the fields. */
137 union tree_node *chain;
138 union tree_node *type;
139 #ifdef ONLY_INT_FIELDS
140 unsigned int code : 8;
142 enum tree_code code : 8;
145 unsigned side_effects_flag : 1;
146 unsigned constant_flag : 1;
147 unsigned permanent_flag : 1;
148 unsigned addressable_flag : 1;
149 unsigned volatile_flag : 1;
150 unsigned readonly_flag : 1;
151 unsigned unsigned_flag : 1;
152 unsigned asm_written_flag: 1;
154 unsigned used_flag : 1;
155 unsigned raises_flag : 1;
156 unsigned static_flag : 1;
157 unsigned public_flag : 1;
158 unsigned private_flag : 1;
159 unsigned protected_flag : 1;
161 unsigned lang_flag_0 : 1;
162 unsigned lang_flag_1 : 1;
163 unsigned lang_flag_2 : 1;
164 unsigned lang_flag_3 : 1;
165 unsigned lang_flag_4 : 1;
166 unsigned lang_flag_5 : 1;
167 unsigned lang_flag_6 : 1;
168 /* There is room for two more flags. */
171 /* Define accessors for the fields that all tree nodes have
172 (though some fields are not used for all kinds of nodes). */
174 /* The tree-code says what kind of node it is.
175 Codes are defined in tree.def. */
176 #define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code)
177 #define TREE_SET_CODE(NODE, VALUE) ((NODE)->common.code = (int) (VALUE))
179 /* In all nodes that are expressions, this is the data type of the expression.
180 In POINTER_TYPE nodes, this is the type that the pointer points to.
181 In ARRAY_TYPE nodes, this is the type of the elements. */
182 #define TREE_TYPE(NODE) ((NODE)->common.type)
184 /* Nodes are chained together for many purposes.
185 Types are chained together to record them for being output to the debugger
186 (see the function `chain_type').
187 Decls in the same scope are chained together to record the contents
189 Statement nodes for successive statements used to be chained together.
190 Often lists of things are represented by TREE_LIST nodes that
191 are chained together. */
193 #define TREE_CHAIN(NODE) ((NODE)->common.chain)
195 /* Given an expression as a tree, strip any NON_LVALUE_EXPRs and NOP_EXPRs
196 that don't change the machine mode. */
198 #define STRIP_NOPS(EXP) \
199 while ((TREE_CODE (EXP) == NOP_EXPR \
200 || TREE_CODE (EXP) == CONVERT_EXPR \
201 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
202 && (TYPE_MODE (TREE_TYPE (EXP)) \
203 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
204 (EXP) = TREE_OPERAND (EXP, 0);
206 /* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */
208 #define STRIP_TYPE_NOPS(EXP) \
209 while ((TREE_CODE (EXP) == NOP_EXPR \
210 || TREE_CODE (EXP) == CONVERT_EXPR \
211 || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
212 && (TREE_TYPE (EXP) \
213 == TREE_TYPE (TREE_OPERAND (EXP, 0)))) \
214 (EXP) = TREE_OPERAND (EXP, 0);
216 /* Define many boolean fields that all tree nodes have. */
218 /* In VAR_DECL nodes, nonzero means address of this is needed.
219 So it cannot be in a register.
220 In a FUNCTION_DECL, nonzero means its address is needed.
221 So it must be compiled even if it is an inline function.
222 In CONSTRUCTOR nodes, it means object constructed must be in memory.
223 In LABEL_DECL nodes, it means a goto for this label has been seen
224 from a place outside all binding contours that restore stack levels.
225 In ..._TYPE nodes, it means that objects of this type must
226 be fully addressable. This means that pieces of this
227 object cannot go into register parameters, for example.
228 In IDENTIFIER_NODEs, this means that some extern decl for this name
229 had its address taken. That matters for inline functions. */
230 #define TREE_ADDRESSABLE(NODE) ((NODE)->common.addressable_flag)
232 /* In a VAR_DECL, nonzero means allocate static storage.
233 In a FUNCTION_DECL, currently nonzero if function has been defined.
234 In a CONSTRUCTOR, nonzero means allocate static storage. */
235 #define TREE_STATIC(NODE) ((NODE)->common.static_flag)
237 /* In a CONVERT_EXPR or NOP_EXPR, this means the node was made
238 implicitly and should not lead to an "unused value" warning. */
239 #define TREE_NO_UNUSED_WARNING(NODE) ((NODE)->common.static_flag)
241 /* In a NON_LVALUE_EXPR, this means there was overflow in folding.
242 The folded constant is inside the NON_LVALUE_EXPR. */
243 #define TREE_CONSTANT_OVERFLOW(NODE) ((NODE)->common.static_flag)
245 /* Nonzero for a TREE_LIST or TREE_VEC node means that the derivation
246 chain is via a `virtual' declaration. */
247 #define TREE_VIA_VIRTUAL(NODE) ((NODE)->common.static_flag)
249 /* In a VAR_DECL or FUNCTION_DECL,
250 nonzero means name is to be accessible from outside this module.
251 In an identifier node, nonzero means a external declaration
252 accessible from outside this module was previously seen
253 for this name in an inner scope. */
254 #define TREE_PUBLIC(NODE) ((NODE)->common.public_flag)
256 /* Nonzero for TREE_LIST or TREE_VEC node means that the path to the
257 base class is via a `public' declaration, which preserves public
258 fields from the base class as public. */
259 #define TREE_VIA_PUBLIC(NODE) ((NODE)->common.public_flag)
261 /* In any expression, nonzero means it has side effects or reevaluation
262 of the whole expression could produce a different value.
263 This is set if any subexpression is a function call, a side effect
264 or a reference to a volatile variable.
265 In a ..._DECL, this is set only if the declaration said `volatile'. */
266 #define TREE_SIDE_EFFECTS(NODE) ((NODE)->common.side_effects_flag)
268 /* Nonzero means this expression is volatile in the C sense:
269 its address should be of type `volatile WHATEVER *'.
270 In other words, the declared item is volatile qualified.
271 This is used in _DECL nodes and _REF nodes.
273 In a ..._TYPE node, means this type is volatile-qualified.
274 But use TYPE_VOLATILE instead of this macro when the node is a type,
275 because eventually we may make that a different bit.
277 If this bit is set in an expression, so is TREE_SIDE_EFFECTS. */
278 #define TREE_THIS_VOLATILE(NODE) ((NODE)->common.volatile_flag)
280 /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
281 nonzero means it may not be the lhs of an assignment.
282 In a ..._TYPE node, means this type is const-qualified
283 (but the macro TYPE_READONLY should be used instead of this macro
284 when the node is a type). */
285 #define TREE_READONLY(NODE) ((NODE)->common.readonly_flag)
287 /* Value of expression is constant.
288 Always appears in all ..._CST nodes.
289 May also appear in an arithmetic expression, an ADDR_EXPR or a CONSTRUCTOR
290 if the value is constant. */
291 #define TREE_CONSTANT(NODE) ((NODE)->common.constant_flag)
293 /* Nonzero means permanent node;
294 node will continue to exist for the entire compiler run.
295 Otherwise it will be recycled at the end of the function. */
296 #define TREE_PERMANENT(NODE) ((NODE)->common.permanent_flag)
298 /* In INTEGER_TYPE or ENUMERAL_TYPE nodes, means an unsigned type.
299 In FIELD_DECL nodes, means an unsigned bit field.
300 The same bit is used in functions as DECL_BUILT_IN_NONANSI. */
301 #define TREE_UNSIGNED(NODE) ((NODE)->common.unsigned_flag)
303 /* Nonzero in a VAR_DECL means assembler code has been written.
304 Nonzero in a FUNCTION_DECL means that the function has been compiled.
305 This is interesting in an inline function, since it might not need
306 to be compiled separately.
307 Nonzero in a RECORD_TYPE, UNION_TYPE or ENUMERAL_TYPE
308 if the sdb debugging info for the type has been written. */
309 #define TREE_ASM_WRITTEN(NODE) ((NODE)->common.asm_written_flag)
311 /* Nonzero in a _DECL if the name is used in its scope.
312 Nonzero in an expr node means inhibit warning if value is unused.
313 In IDENTIFIER_NODEs, this means that some extern decl for this name
315 #define TREE_USED(NODE) ((NODE)->common.used_flag)
317 /* Nonzero for a tree node whose evaluation could result
318 in the raising of an exception. Not implemented yet. */
319 #define TREE_RAISES(NODE) ((NODE)->common.raises_flag)
321 /* These are currently used in classes in C++. */
322 #define TREE_PRIVATE(NODE) ((NODE)->common.private_flag)
323 #define TREE_PROTECTED(NODE) ((NODE)->common.protected_flag)
325 #define TREE_LANG_FLAG_0(NODE) ((NODE)->common.lang_flag_0)
326 #define TREE_LANG_FLAG_1(NODE) ((NODE)->common.lang_flag_1)
327 #define TREE_LANG_FLAG_2(NODE) ((NODE)->common.lang_flag_2)
328 #define TREE_LANG_FLAG_3(NODE) ((NODE)->common.lang_flag_3)
329 #define TREE_LANG_FLAG_4(NODE) ((NODE)->common.lang_flag_4)
330 #define TREE_LANG_FLAG_5(NODE) ((NODE)->common.lang_flag_5)
331 #define TREE_LANG_FLAG_6(NODE) ((NODE)->common.lang_flag_6)
333 /* Define additional fields and accessors for nodes representing constants. */
335 /* In an INTEGER_CST node. These two together make a 2-word integer.
336 If the data type is signed, the value is sign-extended to 2 words
337 even though not all of them may really be in use.
338 In an unsigned constant shorter than 2 words, the extra bits are 0. */
339 #define TREE_INT_CST_LOW(NODE) ((NODE)->int_cst.int_cst_low)
340 #define TREE_INT_CST_HIGH(NODE) ((NODE)->int_cst.int_cst_high)
342 #define INT_CST_LT(A, B) \
343 (TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \
344 || (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \
345 && ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \
346 < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B))))
348 #define INT_CST_LT_UNSIGNED(A, B) \
349 (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
350 < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
351 || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
352 == (unsigned HOST_WIDE_INT ) TREE_INT_CST_HIGH (B)) \
353 && (((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \
354 < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B)))))
358 char common[sizeof (struct tree_common)];
359 HOST_WIDE_INT int_cst_low;
360 HOST_WIDE_INT int_cst_high;
363 /* In REAL_CST, STRING_CST, COMPLEX_CST nodes, and CONSTRUCTOR nodes,
364 and generally in all kinds of constants that could
365 be given labels (rather than being immediate). */
367 #define TREE_CST_RTL(NODE) ((NODE)->real_cst.rtl)
369 /* In a REAL_CST node. */
370 /* We can represent a real value as either a `double' or a string.
371 Strings don't allow for any optimization, but they do allow
372 for cross-compilation. */
374 #define TREE_REAL_CST(NODE) ((NODE)->real_cst.real_cst)
380 char common[sizeof (struct tree_common)];
381 struct rtx_def *rtl; /* acts as link to register transfer language
383 REAL_VALUE_TYPE real_cst;
386 /* In a STRING_CST */
387 #define TREE_STRING_LENGTH(NODE) ((NODE)->string.length)
388 #define TREE_STRING_POINTER(NODE) ((NODE)->string.pointer)
392 char common[sizeof (struct tree_common)];
393 struct rtx_def *rtl; /* acts as link to register transfer language
399 /* In a COMPLEX_CST node. */
400 #define TREE_REALPART(NODE) ((NODE)->complex.real)
401 #define TREE_IMAGPART(NODE) ((NODE)->complex.imag)
405 char common[sizeof (struct tree_common)];
406 struct rtx_def *rtl; /* acts as link to register transfer language
408 union tree_node *real;
409 union tree_node *imag;
412 /* Define fields and accessors for some special-purpose tree nodes. */
414 #define IDENTIFIER_LENGTH(NODE) ((NODE)->identifier.length)
415 #define IDENTIFIER_POINTER(NODE) ((NODE)->identifier.pointer)
416 #define IDENTIFIER_VIRTUAL_P(NODE) TREE_LANG_FLAG_1(NODE)
418 struct tree_identifier
420 char common[sizeof (struct tree_common)];
425 /* In a TREE_LIST node. */
426 #define TREE_PURPOSE(NODE) ((NODE)->list.purpose)
427 #define TREE_VALUE(NODE) ((NODE)->list.value)
431 char common[sizeof (struct tree_common)];
432 union tree_node *purpose;
433 union tree_node *value;
436 /* In a TREE_VEC node. */
437 #define TREE_VEC_LENGTH(NODE) ((NODE)->vec.length)
438 #define TREE_VEC_ELT(NODE,I) ((NODE)->vec.a[I])
439 #define TREE_VEC_END(NODE) (&((NODE)->vec.a[(NODE)->vec.length]))
443 char common[sizeof (struct tree_common)];
445 union tree_node *a[1];
448 /* Define fields and accessors for some nodes that represent expressions. */
450 /* In a SAVE_EXPR node. */
451 #define SAVE_EXPR_CONTEXT(NODE) TREE_OPERAND(NODE, 1)
452 #define SAVE_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[2])
454 /* In a RTL_EXPR node. */
455 #define RTL_EXPR_SEQUENCE(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[0])
456 #define RTL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[1])
458 /* In a CALL_EXPR node. */
459 #define CALL_EXPR_RTL(NODE) (*(struct rtx_def **) &(NODE)->exp.operands[2])
461 /* In a CONSTRUCTOR node. */
462 #define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND (NODE, 1)
464 /* In a BLOCK node. */
465 #define BLOCK_VARS(NODE) ((NODE)->exp.operands[0])
466 #define BLOCK_TYPE_TAGS(NODE) ((NODE)->exp.operands[1])
467 #define BLOCK_SUBBLOCKS(NODE) ((NODE)->exp.operands[2])
468 #define BLOCK_SUPERCONTEXT(NODE) ((NODE)->exp.operands[3])
469 /* Note: when changing this, make sure to find the places
470 that use chainon or nreverse. */
471 #define BLOCK_CHAIN(NODE) TREE_CHAIN (NODE)
473 /* Nonzero means that this block is prepared to handle exceptions
474 listed in the BLOCK_VARS slot. */
475 #define BLOCK_HANDLER_BLOCK(NODE) TREE_PROTECTED(NODE)
477 /* In ordinary expression nodes. */
478 #define TREE_OPERAND(NODE, I) ((NODE)->exp.operands[I])
479 #define TREE_COMPLEXITY(NODE) ((NODE)->exp.complexity)
483 char common[sizeof (struct tree_common)];
485 union tree_node *operands[1];
488 /* Define fields and accessors for nodes representing data types. */
490 /* See tree.def for documentation of the use of these fields.
491 Look at the documentation of the various ..._TYPE tree codes. */
493 #define TYPE_UID(NODE) ((NODE)->type.uid)
494 #define TYPE_SIZE(NODE) ((NODE)->type.size)
495 #define TYPE_MODE(NODE) ((NODE)->type.mode)
496 #define TYPE_VALUES(NODE) ((NODE)->type.values)
497 #define TYPE_DOMAIN(NODE) ((NODE)->type.values)
498 #define TYPE_FIELDS(NODE) ((NODE)->type.values)
499 #define TYPE_METHODS(NODE) ((NODE)->type.maxval)
500 #define TYPE_VFIELD(NODE) ((NODE)->type.minval)
501 #define TYPE_ARG_TYPES(NODE) ((NODE)->type.values)
502 #define TYPE_METHOD_BASETYPE(NODE) ((NODE)->type.maxval)
503 #define TYPE_OFFSET_BASETYPE(NODE) ((NODE)->type.maxval)
504 #define TYPE_POINTER_TO(NODE) ((NODE)->type.pointer_to)
505 #define TYPE_REFERENCE_TO(NODE) ((NODE)->type.reference_to)
506 #define TYPE_MIN_VALUE(NODE) ((NODE)->type.minval)
507 #define TYPE_MAX_VALUE(NODE) ((NODE)->type.maxval)
508 #define TYPE_PRECISION(NODE) ((NODE)->type.precision)
509 #define TYPE_PARSE_INFO(NODE) ((NODE)->type.parse_info)
510 #define TYPE_SYMTAB_ADDRESS(NODE) ((NODE)->type.symtab_address)
511 #define TYPE_NAME(NODE) ((NODE)->type.name)
512 #define TYPE_NEXT_VARIANT(NODE) ((NODE)->type.next_variant)
513 #define TYPE_MAIN_VARIANT(NODE) ((NODE)->type.main_variant)
514 #define TYPE_BINFO(NODE) ((NODE)->type.binfo)
515 #define TYPE_NONCOPIED_PARTS(NODE) ((NODE)->type.noncopied_parts)
516 #define TYPE_CONTEXT(NODE) ((NODE)->type.context)
517 #define TYPE_LANG_SPECIFIC(NODE) ((NODE)->type.lang_specific)
519 /* The alignment necessary for objects of this type.
520 The value is an int, measured in bits. */
521 #define TYPE_ALIGN(NODE) ((NODE)->type.align)
523 #define TYPE_STUB_DECL(NODE) (TREE_CHAIN (NODE))
525 /* In a RECORD_TYPE or UNION_TYPE, it means the type has BLKmode
526 only because it lacks the alignment requirement for its size. */
527 #define TYPE_NO_FORCE_BLK(NODE) ((NODE)->type.no_force_blk_flag)
529 /* Nonzero in a type considered volatile as a whole. */
530 #define TYPE_VOLATILE(NODE) ((NODE)->common.volatile_flag)
532 /* Means this type is const-qualified. */
533 #define TYPE_READONLY(NODE) ((NODE)->common.readonly_flag)
535 #define TYPE_LANG_FLAG_0(NODE) ((NODE)->type.lang_flag_0)
536 #define TYPE_LANG_FLAG_1(NODE) ((NODE)->type.lang_flag_1)
537 #define TYPE_LANG_FLAG_2(NODE) ((NODE)->type.lang_flag_2)
538 #define TYPE_LANG_FLAG_3(NODE) ((NODE)->type.lang_flag_3)
539 #define TYPE_LANG_FLAG_4(NODE) ((NODE)->type.lang_flag_4)
540 #define TYPE_LANG_FLAG_5(NODE) ((NODE)->type.lang_flag_5)
541 #define TYPE_LANG_FLAG_6(NODE) ((NODE)->type.lang_flag_6)
545 char common[sizeof (struct tree_common)];
546 union tree_node *values;
547 union tree_node *size;
550 #ifdef ONLY_INT_FIELDS
553 enum machine_mode mode : 8;
556 unsigned char precision;
558 unsigned no_force_blk_flag : 1;
559 unsigned lang_flag_0 : 1;
560 unsigned lang_flag_1 : 1;
561 unsigned lang_flag_2 : 1;
562 unsigned lang_flag_3 : 1;
563 unsigned lang_flag_4 : 1;
564 unsigned lang_flag_5 : 1;
565 unsigned lang_flag_6 : 1;
567 union tree_node *pointer_to;
568 union tree_node *reference_to;
571 union tree_node *name;
572 union tree_node *minval;
573 union tree_node *maxval;
574 union tree_node *next_variant;
575 union tree_node *main_variant;
576 union tree_node *binfo;
577 union tree_node *noncopied_parts;
578 union tree_node *context;
579 /* Points to a structure whose details depend on the language in use. */
580 struct lang_type *lang_specific;
583 /* Define accessor macros for information about type inheritance
586 A "basetype" means a particular usage of a data type for inheritance
587 in another type. Each such basetype usage has its own "binfo"
588 object to describe it. The binfo object is a TREE_VEC node.
590 Inheritance is represented by the binfo nodes allocated for a
591 given type. For example, given types C and D, such that D is
592 inherited by C, 3 binfo nodes will be allocated: one for describing
593 the binfo properties of C, similarly one for D, and one for
594 describing the binfo properties of D as a base type for C.
595 Thus, given a pointer to class C, one can get a pointer to the binfo
596 of D acting as a basetype for C by looking at C's binfo's basetypes. */
598 /* The actual data type node being inherited in this basetype. */
599 #define BINFO_TYPE(NODE) TREE_TYPE (NODE)
601 /* The offset where this basetype appears in its containing type.
602 BINFO_OFFSET slot holds the offset (in bytes)
603 from the base of the complete object to the base of the part of the
604 object that is allocated on behalf of this `type'.
605 This is always 0 except when there is multiple inheritance. */
607 #define BINFO_OFFSET(NODE) TREE_VEC_ELT ((NODE), 1)
608 #define TYPE_BINFO_OFFSET(NODE) BINFO_OFFSET (TYPE_BINFO (NODE))
609 #define BINFO_OFFSET_ZEROP(NODE) (BINFO_OFFSET (NODE) == integer_zero_node)
611 /* The virtual function table belonging to this basetype. Virtual
612 function tables provide a mechanism for run-time method dispatching.
613 The entries of a virtual function table are language-dependent. */
615 #define BINFO_VTABLE(NODE) TREE_VEC_ELT ((NODE), 2)
616 #define TYPE_BINFO_VTABLE(NODE) BINFO_VTABLE (TYPE_BINFO (NODE))
618 /* The virtual functions in the virtual function table. This is
619 a TREE_LIST that is used as an initial approximation for building
620 a virtual function table for this basetype. */
621 #define BINFO_VIRTUALS(NODE) TREE_VEC_ELT ((NODE), 3)
622 #define TYPE_BINFO_VIRTUALS(NODE) BINFO_VIRTUALS (TYPE_BINFO (NODE))
624 /* A vector of additional binfos for the types inherited by this basetype.
626 If this basetype describes type D as inherited in C,
627 and if the basetypes of D are E anf F,
628 then this vector contains binfos for inheritance of E and F by C.
630 ??? This could probably be done by just allocating the
631 base types at the end of this TREE_VEC (instead of using
632 another TREE_VEC). This would simplify the calculation
633 of how many basetypes a given type had. */
634 #define BINFO_BASETYPES(NODE) TREE_VEC_ELT ((NODE), 4)
635 #define TYPE_BINFO_BASETYPES(NODE) TREE_VEC_ELT (TYPE_BINFO (NODE), 4)
637 /* Accessor macro to get to the Nth basetype of this basetype. */
638 #define BINFO_BASETYPE(NODE,N) TREE_VEC_ELT (BINFO_BASETYPES (NODE), (N))
639 #define TYPE_BINFO_BASETYPE(NODE,N) BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (NODE)), (N)))
641 /* Slot used to build a chain that represents a use of inheritance.
642 For example, if X is derived from Y, and Y is derived from Z,
643 then this field can be used to link the binfo node for X to
644 the binfo node for X's Y to represent the use of inheritance
645 from X to Y. Similarly, this slot of the binfo node for X's Y
646 can point to the Z from which Y is inherited (in X's inheritance
647 hierarchy). In this fashion, one can represent and traverse specific
648 uses of inheritance using the binfo nodes themselves (instead of
649 consing new space pointing to binfo nodes).
650 It is up to the language-dependent front-ends to maintain
651 this information as necessary. */
652 #define BINFO_INHERITANCE_CHAIN(NODE) TREE_VEC_ELT ((NODE), 0)
654 /* Define fields and accessors for nodes representing declared names. */
656 /* This is the name of the object as written by the user.
657 It is an IDENTIFIER_NODE. */
658 #define DECL_NAME(NODE) ((NODE)->decl.name)
659 /* This macro is marked for death. */
660 #define DECL_PRINT_NAME(NODE) ((NODE)->decl.print_name)
661 /* This is the name of the object as the assembler will see it
662 (but before any translations made by ASM_OUTPUT_LABELREF).
663 Often this is the same as DECL_NAME.
664 It is an IDENTIFIER_NODE. */
665 #define DECL_ASSEMBLER_NAME(NODE) ((NODE)->decl.assembler_name)
666 /* The containing binding context; either a BINDING
667 or a RECORD_TYPE or UNION_TYPE. */
668 #define DECL_CONTEXT(NODE) ((NODE)->decl.context)
669 #define DECL_FIELD_CONTEXT(NODE) ((NODE)->decl.context)
670 /* In a FIELD_DECL, this is the field position, counting in bits,
671 of the bit closest to the beginning of the structure. */
672 #define DECL_FIELD_BITPOS(NODE) ((NODE)->decl.arguments)
673 /* In a FIELD_DECL, this indicates whether the field was a bit-field and
674 if so, the type that was originally specified for it.
675 TREE_TYPE may have been modified (in finish_struct). */
676 #define DECL_BIT_FIELD_TYPE(NODE) ((NODE)->decl.result)
677 /* In FUNCTION_DECL, a chain of ..._DECL nodes. */
678 /* VAR_DECL and PARM_DECL reserve the arguments slot
679 for language-specific uses. */
680 #define DECL_ARGUMENTS(NODE) ((NODE)->decl.arguments)
681 /* In FUNCTION_DECL, holds the decl for the return value. */
682 #define DECL_RESULT(NODE) ((NODE)->decl.result)
683 /* In PARM_DECL, holds the type as written (perhaps a function or array). */
684 #define DECL_ARG_TYPE_AS_WRITTEN(NODE) ((NODE)->decl.result)
685 /* For a FUNCTION_DECL, holds the tree of BINDINGs.
686 For a VAR_DECL, holds the initial value.
687 For a PARM_DECL, not used--default
688 values for parameters are encoded in the type of the function,
689 not in the PARM_DECL slot. */
690 #define DECL_INITIAL(NODE) ((NODE)->decl.initial)
691 /* For a PARM_DECL, records the data type used to pass the argument,
692 which may be different from the type seen in the program. */
693 #define DECL_ARG_TYPE(NODE) ((NODE)->decl.initial) /* In PARM_DECL. */
694 /* These two fields describe where in the source code the declaration was. */
695 #define DECL_SOURCE_FILE(NODE) ((NODE)->decl.filename)
696 #define DECL_SOURCE_LINE(NODE) ((NODE)->decl.linenum)
697 /* Holds the size of the datum, as a tree expression.
698 Need not be constant. */
699 #define DECL_SIZE(NODE) ((NODE)->decl.size)
700 /* Holds the alignment required for the datum. */
701 #define DECL_ALIGN(NODE) ((NODE)->decl.frame_size)
702 /* Holds the machine mode of a variable or field. */
703 #define DECL_MODE(NODE) ((NODE)->decl.mode)
704 /* Holds the RTL expression for the value of a variable or function. */
705 #define DECL_RTL(NODE) ((NODE)->decl.rtl)
706 /* For PARM_DECL, holds an RTL for the stack slot or register
707 where the data was actually passed. */
708 #define DECL_INCOMING_RTL(NODE) ((NODE)->decl.saved_insns.r)
709 /* For FUNCTION_DECL, if it is inline, holds the saved insn chain. */
710 #define DECL_SAVED_INSNS(NODE) ((NODE)->decl.saved_insns.r)
711 /* For FUNCTION_DECL for built-in function. */
712 #define DECL_FUNCTION_CODE(NODE) \
713 ((enum built_in_function) (NODE)->decl.frame_size)
714 #define DECL_SET_FUNCTION_CODE(NODE,VAL) \
715 ((NODE)->decl.frame_size = (int) (VAL))
716 /* For FUNCTION_DECL, if it is inline,
717 holds the size of the stack frame, as an integer. */
718 #define DECL_FRAME_SIZE(NODE) ((NODE)->decl.frame_size)
719 /* For a FIELD_DECL, holds the size of the member as an integer. */
720 #define DECL_FIELD_SIZE(NODE) ((NODE)->decl.saved_insns.i)
722 /* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways.
723 Before the struct containing the FUNCTION_DECL is laid out,
724 DECL_VINDEX may point to a FUNCTION_DECL in a base class which
725 is the FUNCTION_DECL which this FUNCTION_DECL will replace as a virtual
726 function. When the class is laid out, this pointer is changed
727 to an INTEGER_CST node which is suitable for use as an index
728 into the virtual function table. */
729 #define DECL_VINDEX(NODE) ((NODE)->decl.vindex)
730 /* For FIELD_DECLS, DECL_FCONTEXT is the *first* baseclass in
731 which this FIELD_DECL is defined. This information is needed when
732 writing debugging information about vfield and vbase decls for C++. */
733 #define DECL_FCONTEXT(NODE) ((NODE)->decl.vindex)
735 /* Every ..._DECL node gets a unique number. */
736 #define DECL_UID(NODE) ((NODE)->decl.uid)
738 /* For any sort of a ..._DECL node, this points to the original (abstract)
739 decl node which this decl is an instance of, or else it is NULL indicating
740 that this decl is not an instance of some other decl. */
741 #define DECL_ABSTRACT_ORIGIN(NODE) ((NODE)->decl.abstract_origin)
743 /* Nonzero for any sort of ..._DECL node means this decl node represents
744 an inline instance of some original (abstract) decl from an inline function;
745 suppress any warnings about shadowing some other variable. */
746 #define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != (tree) 0)
748 /* Nonzero if a _DECL means that the name of this decl should be ignored
749 for symbolic debug purposes. */
750 #define DECL_IGNORED_P(NODE) ((NODE)->decl.ignored_flag)
752 /* Nonzero for a given ..._DECL node means that this node represents an
753 "abstract instance" of the given declaration (e.g. in the original
754 declaration of an inline function). When generating symbolic debugging
755 information, we musn't try to generate any address information for nodes
756 marked as "abstract instances" because we don't actually generate
757 any code or allocate any data space for such instances. */
758 #define DECL_ABSTRACT(NODE) ((NODE)->decl.abstract_flag)
760 /* Nonzero if a _DECL means that no warnings should be generated just
761 because this decl is unused. */
762 #define DECL_IN_SYSTEM_HEADER(NODE) ((NODE)->decl.in_system_header_flag)
764 /* Language-specific decl information. */
765 #define DECL_LANG_SPECIFIC(NODE) ((NODE)->decl.lang_specific)
767 /* In a VAR_DECL or FUNCTION_DECL,
768 nonzero means external reference:
769 do not allocate storage, and refer to a definition elsewhere. */
770 #define TREE_EXTERNAL(NODE) ((NODE)->decl.external_flag)
772 /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'.
773 In LABEL_DECL nodes, nonzero means that an error message about
774 jumping into such a binding contour has been printed for this label. */
775 #define TREE_REGDECL(NODE) ((NODE)->decl.regdecl_flag)
776 /* In a FIELD_DECL, indicates this field should be bit-packed. */
777 #define DECL_PACKED(NODE) ((NODE)->decl.regdecl_flag)
779 /* Nonzero in a ..._DECL means this variable is ref'd from a nested function.
780 For VAR_DECL nodes, PARM_DECL nodes, and FUNCTION_DECL nodes.
782 For LABEL_DECL nodes, nonzero if nonlocal gotos to the label are permitted.
784 Also set in some languages for variables, etc., outside the normal
785 lexical scope, such as class instance variables. */
786 #define TREE_NONLOCAL(NODE) ((NODE)->decl.nonlocal_flag)
788 /* Nonzero in a FUNCTION_DECL means this function can be substituted
789 where it is called. */
790 #define TREE_INLINE(NODE) ((NODE)->decl.inline_flag)
792 /* Nonzero in a FUNCTION_DECL means this is a built-in function
793 that is not specified by ansi C and that users are supposed to be allowed
794 to redefine for any purpose whatever. */
795 #define DECL_BUILT_IN_NONANSI(NODE) ((NODE)->common.unsigned_flag)
797 /* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed
799 #define DECL_BIT_FIELD(NODE) ((NODE)->decl.bit_field_flag)
800 /* In a LABEL_DECL, nonzero means label was defined inside a binding
801 contour that restored a stack level and which is now exited. */
802 #define DECL_TOO_LATE(NODE) ((NODE)->decl.bit_field_flag)
803 /* In a FUNCTION_DECL, nonzero means a built in function. */
804 #define DECL_BUILT_IN(NODE) ((NODE)->decl.bit_field_flag)
806 /* Used in VAR_DECLs to indicate that the variable is a vtable.
807 It is also used in FIELD_DECLs for vtable pointers. */
808 #define DECL_VIRTUAL_P(NODE) ((NODE)->decl.virtual_flag)
810 /* Additional flags for language-specific uses. */
811 #define DECL_LANG_FLAG_0(NODE) ((NODE)->decl.lang_flag_0)
812 #define DECL_LANG_FLAG_1(NODE) ((NODE)->decl.lang_flag_1)
813 #define DECL_LANG_FLAG_2(NODE) ((NODE)->decl.lang_flag_2)
814 #define DECL_LANG_FLAG_3(NODE) ((NODE)->decl.lang_flag_3)
815 #define DECL_LANG_FLAG_4(NODE) ((NODE)->decl.lang_flag_4)
816 #define DECL_LANG_FLAG_5(NODE) ((NODE)->decl.lang_flag_5)
817 #define DECL_LANG_FLAG_6(NODE) ((NODE)->decl.lang_flag_6)
818 #define DECL_LANG_FLAG_7(NODE) ((NODE)->decl.lang_flag_7)
822 char common[sizeof (struct tree_common)];
825 union tree_node *size;
827 #ifdef ONLY_INT_FIELDS
830 enum machine_mode mode : 8;
833 unsigned external_flag : 1;
834 unsigned nonlocal_flag : 1;
835 unsigned regdecl_flag : 1;
836 unsigned inline_flag : 1;
837 unsigned bit_field_flag : 1;
838 unsigned virtual_flag : 1;
839 unsigned ignored_flag : 1;
840 unsigned abstract_flag : 1;
842 unsigned in_system_header_flag : 1;
843 /* room for seven more */
845 unsigned lang_flag_0 : 1;
846 unsigned lang_flag_1 : 1;
847 unsigned lang_flag_2 : 1;
848 unsigned lang_flag_3 : 1;
849 unsigned lang_flag_4 : 1;
850 unsigned lang_flag_5 : 1;
851 unsigned lang_flag_6 : 1;
852 unsigned lang_flag_7 : 1;
854 union tree_node *name;
855 union tree_node *context;
856 union tree_node *arguments;
857 union tree_node *result;
858 union tree_node *initial;
859 union tree_node *abstract_origin;
860 /* The PRINT_NAME field is marked for death. */
862 union tree_node *assembler_name;
863 struct rtx_def *rtl; /* acts as link to register transfer language
865 /* For a FUNCTION_DECL, if inline, this is the size of frame needed.
866 If built-in, this is the code for which built-in function. */
868 /* For FUNCTION_DECLs: points to insn that constitutes its definition
869 on the permanent obstack. For any other kind of decl, this is the
875 union tree_node *vindex;
876 /* Points to a structure whose details depend on the language in use. */
877 struct lang_decl *lang_specific;
880 /* Define the overall contents of a tree node.
881 It may be any of the structures declared above
882 for various types of node. */
886 struct tree_common common;
887 struct tree_int_cst int_cst;
888 struct tree_real_cst real_cst;
889 struct tree_string string;
890 struct tree_complex complex;
891 struct tree_identifier identifier;
892 struct tree_decl decl;
893 struct tree_type type;
894 struct tree_list list;
899 /* Format for global names of constructor and destructor functions. */
900 #ifndef NO_DOLLAR_IN_LABEL
901 #define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_$I$%s"
903 #define CONSTRUCTOR_NAME_FORMAT "_GLOBAL_.I.%s"
906 /* The following functions accept a wide integer argument. Rather than
907 having to cast on every function call, we use a macro instead, that is
908 defined here and in rtl.h. */
911 #define exact_log2(N) exact_log2_wide ((HOST_WIDE_INT) (N))
912 #define floor_log2(N) floor_log2_wide ((HOST_WIDE_INT) (N))
915 extern char *oballoc ();
916 extern char *permalloc ();
917 extern char *savealloc ();
918 extern char *xmalloc ();
919 extern char *xrealloc ();
922 /* Lowest level primitive for allocating a node.
923 The TREE_CODE is the only argument. Contents are initialized
924 to zero except for a few of the common fields. */
926 extern tree make_node ();
928 /* Make a copy of a node, with all the same contents except
929 for TREE_PERMANENT. (The copy is permanent
930 iff nodes being made now are permanent.) */
932 extern tree copy_node ();
934 /* Make a copy of a chain of TREE_LIST nodes. */
936 extern tree copy_list ();
938 /* Make a TREE_VEC. */
940 extern tree make_tree_vec ();
942 /* Return the (unique) IDENTIFIER_NODE node for a given name.
943 The name is supplied as a char *. */
945 extern tree get_identifier ();
947 /* Construct various types of nodes. */
949 #define build_int_2(LO,HI) \
950 build_int_2_wide ((HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI))
952 extern tree build_int_2_wide ();
953 extern tree build_real ();
954 extern tree build_real_from_string ();
955 extern tree build_real_from_int_cst ();
956 extern tree build_complex ();
957 extern tree build_string ();
958 extern tree build (), build1 ();
959 extern tree build_nt (), build_parse_node ();
960 extern tree build_tree_list (), build_decl_list ();
961 extern tree build_op_identifier ();
962 extern tree build_decl ();
963 extern tree build_block ();
965 /* Construct various nodes representing data types. */
967 extern tree make_signed_type ();
968 extern tree make_unsigned_type ();
969 extern tree signed_or_unsigned_type ();
970 extern void fixup_unsigned_type ();
971 extern tree build_pointer_type ();
972 extern tree build_reference_type ();
973 extern tree build_index_type (), build_index_2_type ();
974 extern tree build_array_type ();
975 extern tree build_function_type ();
976 extern tree build_method_type ();
977 extern tree build_offset_type ();
978 extern tree build_complex_type ();
979 extern tree array_type_nelts ();
981 /* Construct expressions, performing type checking. */
983 extern tree build_binary_op ();
984 extern tree build_indirect_ref ();
985 extern tree build_unary_op ();
987 /* Given a type node TYPE, and CONSTP and VOLATILEP, return a type
988 for the same kind of data as TYPE describes.
989 Variants point to the "main variant" (which has neither CONST nor VOLATILE)
990 via TYPE_MAIN_VARIANT, and it points to a chain of other variants
991 so that duplicate variants are never made.
992 Only main variants should ever appear as types of expressions. */
994 extern tree build_type_variant ();
996 /* Make a copy of a type node. */
998 extern tree build_type_copy ();
1000 /* Given a ..._TYPE node, calculate the TYPE_SIZE, TYPE_SIZE_UNIT,
1001 TYPE_ALIGN and TYPE_MODE fields.
1002 If called more than once on one node, does nothing except
1003 for the first time. */
1005 extern void layout_type ();
1007 /* Given a hashcode and a ..._TYPE node (for which the hashcode was made),
1008 return a canonicalized ..._TYPE node, so that duplicates are not made.
1009 How the hash code is computed is up to the caller, as long as any two
1010 callers that could hash identical-looking type nodes agree. */
1012 extern tree type_hash_canon ();
1014 /* Given a VAR_DECL, PARM_DECL, RESULT_DECL or FIELD_DECL node,
1015 calculates the DECL_SIZE, DECL_SIZE_UNIT, DECL_ALIGN and DECL_MODE
1016 fields. Call this only once for any given decl node.
1018 Second argument is the boundary that this field can be assumed to
1019 be starting at (in bits). Zero means it can be assumed aligned
1020 on any boundary that may be needed. */
1022 extern void layout_decl ();
1024 /* Fold constants as much as possible in an expression.
1025 Returns the simplified expression.
1026 Acts only on the top level of the expression;
1027 if the argument itself cannot be simplified, its
1028 subexpressions are not changed. */
1030 extern tree fold ();
1032 /* Return an expr equal to X but certainly not valid as an lvalue. */
1034 extern tree non_lvalue ();
1036 extern tree convert ();
1037 extern tree size_in_bytes ();
1038 extern int int_size_in_bytes ();
1039 extern tree size_binop ();
1040 extern tree size_int ();
1041 extern tree round_up ();
1042 extern tree get_pending_sizes ();
1043 extern tree get_permanent_types (), get_temporary_types ();
1045 /* Type for sizes of data-type. */
1047 extern tree sizetype;
1049 /* Concatenate two lists (chains of TREE_LIST nodes) X and Y
1050 by making the last node in X point to Y.
1051 Returns X, except if X is 0 returns Y. */
1053 extern tree chainon ();
1055 /* Make a new TREE_LIST node from specified PURPOSE, VALUE and CHAIN. */
1057 extern tree tree_cons (), perm_tree_cons (), temp_tree_cons ();
1058 extern tree saveable_tree_cons (), decl_tree_cons ();
1060 /* Return the last tree node in a chain. */
1062 extern tree tree_last ();
1064 /* Reverse the order of elements in a chain, and return the new head. */
1066 extern tree nreverse ();
1068 /* Make a copy of a chain of tree nodes. */
1070 extern tree copy_chain ();
1072 /* Returns the length of a chain of nodes
1073 (number of chain pointers to follow before reaching a null pointer). */
1075 extern int list_length ();
1077 /* integer_zerop (tree x) is nonzero if X is an integer constant of value 0 */
1079 extern int integer_zerop ();
1081 /* integer_onep (tree x) is nonzero if X is an integer constant of value 1 */
1083 extern int integer_onep ();
1085 /* integer_all_onesp (tree x) is nonzero if X is an integer constant
1086 all of whose significant bits are 1. */
1088 extern int integer_all_onesp ();
1090 /* integer_pow2p (tree x) is nonzero is X is an integer constant with
1091 exactly one bit 1. */
1093 extern int integer_pow2p ();
1095 /* type_unsigned_p (tree x) is nonzero if the type X is an unsigned type
1096 (all of its possible values are >= 0).
1097 If X is a pointer type, the value is 1.
1098 If X is a real type, the value is 0. */
1100 extern int type_unsigned_p ();
1102 /* staticp (tree x) is nonzero if X is a reference to data allocated
1103 at a fixed address in memory. */
1105 extern int staticp ();
1107 /* Gets an error if argument X is not an lvalue.
1108 Also returns 1 if X is an lvalue, 0 if not. */
1110 extern int lvalue_or_else ();
1112 /* save_expr (EXP) returns an expression equivalent to EXP
1113 but it can be used multiple times within context CTX
1114 and only evaluate EXP once. */
1116 extern tree save_expr ();
1118 /* variable_size (EXP) is like save_expr (EXP) except that it
1119 is for the special case of something that is part of a
1120 variable size for a data type. It makes special arrangements
1121 to compute the value at the right time when the data type
1122 belongs to a function parameter. */
1124 extern tree variable_size ();
1126 /* stabilize_reference (EXP) returns an reference equivalent to EXP
1127 but it can be used multiple times
1128 and only evaluate the subexpressions once. */
1130 extern tree stabilize_reference ();
1132 /* Return EXP, stripped of any conversions to wider types
1133 in such a way that the result of converting to type FOR_TYPE
1134 is the same as if EXP were converted to FOR_TYPE.
1135 If FOR_TYPE is 0, it signifies EXP's type. */
1137 extern tree get_unwidened ();
1139 /* Return OP or a simpler expression for a narrower value
1140 which can be sign-extended or zero-extended to give back OP.
1141 Store in *UNSIGNEDP_PTR either 1 if the value should be zero-extended
1142 or 0 if the value should be sign-extended. */
1144 extern tree get_narrower ();
1146 /* Given MODE and UNSIGNEDP, return a suitable type-tree
1148 The definition of this resides in language-specific code
1149 as the repertoire of available types may vary. */
1151 extern tree type_for_mode ();
1153 /* Given PRECISION and UNSIGNEDP, return a suitable type-tree
1154 for an integer type with at least that precision.
1155 The definition of this resides in language-specific code
1156 as the repertoire of available types may vary. */
1158 extern tree type_for_size ();
1160 /* Given an integer type T, return a type like T but unsigned.
1161 If T is unsigned, the value is T.
1162 The definition of this resides in language-specific code
1163 as the repertoire of available types may vary. */
1165 extern tree unsigned_type ();
1167 /* Given an integer type T, return a type like T but signed.
1168 If T is signed, the value is T.
1169 The definition of this resides in language-specific code
1170 as the repertoire of available types may vary. */
1172 extern tree signed_type ();
1174 /* This function must be defined in the language-specific files.
1175 expand_expr calls it to build the cleanup-expression for a TARGET_EXPR.
1176 This is defined in a language-specific file. */
1178 extern tree maybe_build_cleanup ();
1180 /* Return the floating type node for a given floating machine mode. */
1182 extern tree get_floating_type ();
1184 /* Given an expression EXP that may be a COMPONENT_REF or an ARRAY_REF,
1185 look for nested component-refs or array-refs at constant positions
1186 and find the ultimate containing object, which is returned. */
1188 extern tree get_inner_reference ();
1190 /* Return the FUNCTION_DECL which provides this _DECL with its context,
1192 extern tree decl_function_context ();
1194 /* Return the RECORD_TYPE or UNION_TYPE which provides this _DECL
1195 with its context, or zero if none. */
1196 extern tree decl_type_context ();
1198 /* Given the FUNCTION_DECL for the current function,
1199 return zero if it is ok for this function to be inline.
1200 Otherwise return a warning message with a single %s
1201 for the function's name. */
1203 extern char *function_cannot_inline_p ();
1205 /* Declare commonly used variables for tree structure. */
1207 /* An integer constant with value 0 */
1208 extern tree integer_zero_node;
1210 /* An integer constant with value 1 */
1211 extern tree integer_one_node;
1213 /* An integer constant with value 0 whose type is sizetype. */
1214 extern tree size_zero_node;
1216 /* An integer constant with value 1 whose type is sizetype. */
1217 extern tree size_one_node;
1219 /* A constant of type pointer-to-int and value 0 */
1220 extern tree null_pointer_node;
1222 /* A node of type ERROR_MARK. */
1223 extern tree error_mark_node;
1225 /* The type node for the void type. */
1226 extern tree void_type_node;
1228 /* The type node for the ordinary (signed) integer type. */
1229 extern tree integer_type_node;
1231 /* The type node for the unsigned integer type. */
1232 extern tree unsigned_type_node;
1234 /* The type node for the ordinary character type. */
1235 extern tree char_type_node;
1237 /* Points to the name of the input file from which the current input
1238 being parsed originally came (before it went into cpp). */
1239 extern char *input_filename;
1241 /* Current line number in input file. */
1244 /* Nonzero for -pedantic switch: warn about anything
1245 that standard C forbids. */
1246 extern int pedantic;
1248 /* Nonzero means can safely call expand_expr now;
1249 otherwise layout_type puts variable sizes onto `pending_sizes' instead. */
1251 extern int immediate_size_expand;
1253 /* Points to the FUNCTION_DECL of the function whose body we are reading. */
1255 extern tree current_function_decl;
1257 /* Nonzero if function being compiled can call setjmp. */
1259 extern int current_function_calls_setjmp;
1261 /* Nonzero if function being compiled can call longjmp. */
1263 extern int current_function_calls_longjmp;
1265 /* Nonzero means all ..._TYPE nodes should be allocated permanently. */
1267 extern int all_types_permanent;
1269 /* Pointer to function to compute the name to use to print a declaration. */
1271 extern char *(*decl_printable_name) ();
1274 extern tree make_tree ();
1278 extern tree expand_start_stmt_expr ();
1279 extern tree expand_end_stmt_expr ();
1280 extern void expand_expr_stmt (), clear_last_expr ();
1281 extern void expand_label (), expand_goto (), expand_asm ();
1282 extern void expand_start_cond (), expand_end_cond ();
1283 extern void expand_start_else (), expand_start_elseif ();
1284 extern struct nesting *expand_start_loop ();
1285 extern struct nesting *expand_start_loop_continue_elsewhere ();
1286 extern void expand_loop_continue_here ();
1287 extern void expand_end_loop ();
1288 extern int expand_continue_loop ();
1289 extern int expand_exit_loop (), expand_exit_loop_if_false ();
1290 extern int expand_exit_something ();
1292 extern void expand_start_delayed_expr ();
1293 extern tree expand_end_delayed_expr ();
1294 extern void expand_emit_delayed_expr ();
1296 extern void expand_null_return (), expand_return ();
1297 extern void expand_start_bindings (), expand_end_bindings ();
1298 extern tree last_cleanup_this_contour ();
1299 extern void expand_start_case (), expand_end_case ();
1300 extern int pushcase (), pushcase_range ();
1301 extern void expand_start_function (), expand_end_function ();
1303 /* In fold-const.c */
1305 extern tree invert_truthvalue ();
1307 /* The language front-end must define these functions. */
1309 /* Function of no arguments for initializing lexical scanning. */
1310 extern void init_lex ();
1311 /* Function of no arguments for initializing the symbol table. */
1312 extern void init_decl_processing ();
1314 /* Functions called with no arguments at the beginning and end or processing
1315 the input source file. */
1316 extern void lang_init ();
1317 extern void lang_finish ();
1319 /* Function called with no arguments to parse and compile the input. */
1320 extern int yyparse ();
1321 /* Function called with option as argument
1322 to decode options starting with -f or -W or +.
1323 It should return nonzero if it handles the option. */
1324 extern int lang_decode_option ();
1326 /* Functions for processing symbol declarations. */
1327 /* Function to enter a new lexical scope.
1328 Takes one argument: always zero when called from outside the front end. */
1329 extern void pushlevel ();
1330 /* Function to exit a lexical scope. It returns a BINDING for that scope.
1331 Takes three arguments:
1332 KEEP -- nonzero if there were declarations in this scope.
1333 REVERSE -- reverse the order of decls before returning them.
1334 FUNCTIONBODY -- nonzero if this level is the body of a function. */
1335 extern tree poplevel ();
1336 /* Function to add a decl to the current scope level.
1337 Takes one argument, a decl to add.
1338 Returns that decl, or, if the same symbol is already declared, may
1339 return a different decl for that name. */
1340 extern tree pushdecl ();
1341 /* Function to return the chain of decls so far in the current scope level. */
1342 extern tree getdecls ();
1343 /* Function to return the chain of structure tags in the current scope level. */
1344 extern tree gettags ();