2014-12-19 Andrew MacLeod <amacleod@redhat.com>
[official-gcc.git] / gcc / ttype.patch
blob2e66b8b153f8bcbc29c7b88991f51ef677c06596
1 Index: c-family/c-common.h
2 ===================================================================
3 *** c-family/c-common.h (revision 218872)
4 --- c-family/c-common.h (working copy)
5 *************** extern enum omp_clause_default_kind c_om
6 *** 1242,1252 ****
7 static inline tree
8 c_tree_chain_next (tree t)
10 - /* TREE_CHAIN of a type is TYPE_STUB_DECL, which is different
11 - kind of object, never a long chain of nodes. Prefer
12 - TYPE_NEXT_VARIANT for types. */
13 - if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_TYPE_COMMON))
14 - return TYPE_NEXT_VARIANT (t);
15 /* Otherwise, if there is TREE_CHAIN, return it. */
16 if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_COMMON))
17 return TREE_CHAIN (t);
18 --- 1242,1247 ----
19 Index: tree-core.h
20 ===================================================================
21 *** tree-core.h (revision 218966)
22 --- tree-core.h (working copy)
23 *************** typedef tree (*walk_tree_fn) (tree *, in
24 *** 723,730 ****
25 typedef tree (*walk_tree_lh) (tree *, int *, tree (*) (tree *, int *, void *),
26 void *, hash_set<tree> *);
28 ! typedef union tree_node *ttype;
29 ! typedef const union tree_node *const_ttype;
31 /*---------------------------------------------------------------------------
32 Main data structures
33 --- 723,730 ----
34 typedef tree (*walk_tree_lh) (tree *, int *, tree (*) (tree *, int *, void *),
35 void *, hash_set<tree> *);
37 ! typedef struct tree_type_common *ttype;
38 ! typedef const struct tree_type_common *const_ttype;
40 /*---------------------------------------------------------------------------
41 Main data structures
42 *************** union GTY ((ptr_alias (union lang_tree_n
43 *** 1689,1695 ****
44 struct tree_function_decl GTY ((tag ("TS_FUNCTION_DECL"))) function_decl;
45 struct tree_translation_unit_decl GTY ((tag ("TS_TRANSLATION_UNIT_DECL")))
46 translation_unit_decl;
47 - struct tree_type_common GTY ((tag ("TS_TYPE_COMMON"))) type_common;
48 struct tree_list GTY ((tag ("TS_LIST"))) list;
49 struct tree_vec GTY ((tag ("TS_VEC"))) vec;
50 struct tree_exp GTY ((tag ("TS_EXP"))) exp;
51 --- 1689,1694 ----
52 Index: tree.h
53 ===================================================================
54 *** tree.h (revision 218966)
55 --- tree.h (working copy)
56 *************** extern void omp_clause_range_check_faile
57 *** 398,404 ****
59 #include "tree-check.h"
61 ! #define TYPE_CHECK(T) TREE_CLASS_CHECK (T, tcc_type)
62 #define DECL_MINIMAL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_MINIMAL)
63 #define DECL_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_COMMON)
64 #define DECL_WRTL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_WRTL)
65 --- 398,404 ----
67 #include "tree-check.h"
69 ! #define TYPE_CHECK(T) (T)
70 #define DECL_MINIMAL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_MINIMAL)
71 #define DECL_COMMON_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_COMMON)
72 #define DECL_WRTL_CHECK(T) CONTAINS_STRUCT_CHECK (T, TS_DECL_WRTL)
73 *************** extern void protected_set_expr_location
74 *** 1561,1582 ****
75 type. Note also that some of the front-ends also overload these fields,
76 so they must be checked as well. */
78 ! #define TYPE_UID(NODE) (TYPE_CHECK (NODE)->type_common.uid)
79 ! #define TYPE_SIZE(NODE) (TYPE_CHECK (NODE)->type_common.size)
80 ! #define TYPE_SIZE_UNIT(NODE) (TYPE_CHECK (NODE)->type_common.size_unit)
81 ! #define TYPE_POINTER_TO(NODE) (TYPE_CHECK (NODE)->type_common.pointer_to)
82 ! #define TYPE_REFERENCE_TO(NODE) (TYPE_CHECK (NODE)->type_common.reference_to)
83 ! #define TYPE_PRECISION(NODE) (TYPE_CHECK (NODE)->type_common.precision)
84 ! #define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type_common.name)
85 ! #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type_common.next_variant)
86 ! #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type_common.main_variant)
87 ! #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->type_common.context)
89 #define TYPE_MODE(NODE) \
90 (VECTOR_TYPE_P (TYPE_CHECK (NODE)) \
91 ! ? vector_type_mode (NODE) : (NODE)->type_common.mode)
92 #define SET_TYPE_MODE(NODE, MODE) \
93 ! (TYPE_CHECK (NODE)->type_common.mode = (MODE))
95 extern machine_mode element_mode (const_tree t);
97 --- 1561,1582 ----
98 type. Note also that some of the front-ends also overload these fields,
99 so they must be checked as well. */
101 ! #define TYPE_UID(NODE) (TYPE_CHECK (NODE)->uid)
102 ! #define TYPE_SIZE(NODE) (TYPE_CHECK (NODE)->size)
103 ! #define TYPE_SIZE_UNIT(NODE) (TYPE_CHECK (NODE)->size_unit)
104 ! #define TYPE_POINTER_TO(NODE) (TYPE_CHECK (NODE)->pointer_to)
105 ! #define TYPE_REFERENCE_TO(NODE) (TYPE_CHECK (NODE)->reference_to)
106 ! #define TYPE_PRECISION(NODE) (TYPE_CHECK (NODE)->precision)
107 ! #define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->name)
108 ! #define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->next_variant)
109 ! #define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->main_variant)
110 ! #define TYPE_CONTEXT(NODE) (TYPE_CHECK (NODE)->context)
112 #define TYPE_MODE(NODE) \
113 (VECTOR_TYPE_P (TYPE_CHECK (NODE)) \
114 ! ? vector_type_mode (NODE) : (NODE)->mode)
115 #define SET_TYPE_MODE(NODE, MODE) \
116 ! (TYPE_CHECK (NODE)->mode = (MODE))
118 extern machine_mode element_mode (const_tree t);
120 *************** extern machine_mode element_mode (const_
121 *** 1596,1602 ****
122 to each other without a conversion. The middle-end also makes sure
123 to assign the same alias-sets to the type partition with equal
124 TYPE_CANONICAL of their unqualified variants. */
125 ! #define TYPE_CANONICAL(NODE) (TYPE_CHECK (NODE)->type_common.canonical)
126 /* Indicates that the type node requires structural equality
127 checks. The compiler will need to look at the composition of the
128 type to determine whether it is equal to another type, rather than
129 --- 1596,1602 ----
130 to each other without a conversion. The middle-end also makes sure
131 to assign the same alias-sets to the type partition with equal
132 TYPE_CANONICAL of their unqualified variants. */
133 ! #define TYPE_CANONICAL(NODE) (TYPE_CHECK (NODE)->canonical)
134 /* Indicates that the type node requires structural equality
135 checks. The compiler will need to look at the composition of the
136 type to determine whether it is equal to another type, rather than
137 *************** extern machine_mode element_mode (const_
138 *** 1616,1635 ****
139 other. If the TYPE_ALIAS_SET is -1, no alias set has yet been
140 assigned to this type. If the TYPE_ALIAS_SET is 0, objects of this
141 type can alias objects of any type. */
142 ! #define TYPE_ALIAS_SET(NODE) (TYPE_CHECK (NODE)->type_common.alias_set)
144 /* Nonzero iff the typed-based alias set for this type has been
145 calculated. */
146 #define TYPE_ALIAS_SET_KNOWN_P(NODE) \
147 ! (TYPE_CHECK (NODE)->type_common.alias_set != -1)
149 /* A TREE_LIST of IDENTIFIER nodes of the attributes that apply
150 to this type. */
151 ! #define TYPE_ATTRIBUTES(NODE) (TYPE_CHECK (NODE)->type_common.attributes)
153 /* The alignment necessary for objects of this type.
154 The value is an int, measured in bits. */
155 ! #define TYPE_ALIGN(NODE) (TYPE_CHECK (NODE)->type_common.align)
157 /* 1 if the alignment for this type was requested by "aligned" attribute,
158 0 if it is the default for this type. */
159 --- 1616,1635 ----
160 other. If the TYPE_ALIAS_SET is -1, no alias set has yet been
161 assigned to this type. If the TYPE_ALIAS_SET is 0, objects of this
162 type can alias objects of any type. */
163 ! #define TYPE_ALIAS_SET(NODE) (TYPE_CHECK (NODE)->alias_set)
165 /* Nonzero iff the typed-based alias set for this type has been
166 calculated. */
167 #define TYPE_ALIAS_SET_KNOWN_P(NODE) \
168 ! (TYPE_CHECK (NODE)->alias_set != -1)
170 /* A TREE_LIST of IDENTIFIER nodes of the attributes that apply
171 to this type. */
172 ! #define TYPE_ATTRIBUTES(NODE) (TYPE_CHECK (NODE)->attributes)
174 /* The alignment necessary for objects of this type.
175 The value is an int, measured in bits. */
176 ! #define TYPE_ALIGN(NODE) (TYPE_CHECK (NODE)->align)
178 /* 1 if the alignment for this type was requested by "aligned" attribute,
179 0 if it is the default for this type. */
180 *************** extern machine_mode element_mode (const_
181 *** 1651,1657 ****
182 the type has BLKmode only because it lacks the alignment required for
183 its size. */
184 #define TYPE_NO_FORCE_BLK(NODE) \
185 ! (TYPE_CHECK (NODE)->type_common.no_force_blk_flag)
187 /* Nonzero in a type considered volatile as a whole. */
188 #define TYPE_VOLATILE(NODE) (TYPE_CHECK (NODE)->base.volatile_flag)
189 --- 1651,1657 ----
190 the type has BLKmode only because it lacks the alignment required for
191 its size. */
192 #define TYPE_NO_FORCE_BLK(NODE) \
193 ! (TYPE_CHECK (NODE)->no_force_blk_flag)
195 /* Nonzero in a type considered volatile as a whole. */
196 #define TYPE_VOLATILE(NODE) (TYPE_CHECK (NODE)->base.volatile_flag)
197 *************** extern machine_mode element_mode (const_
198 *** 1664,1670 ****
200 /* If nonzero, this type is `restrict'-qualified, in the C sense of
201 the term. */
202 ! #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type_common.restrict_flag)
204 /* If nonzero, type's name shouldn't be emitted into debug info. */
205 #define TYPE_NAMELESS(NODE) (TYPE_CHECK (NODE)->base.u.bits.nameless_flag)
206 --- 1664,1670 ----
208 /* If nonzero, this type is `restrict'-qualified, in the C sense of
209 the term. */
210 ! #define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->restrict_flag)
212 /* If nonzero, type's name shouldn't be emitted into debug info. */
213 #define TYPE_NAMELESS(NODE) (TYPE_CHECK (NODE)->base.u.bits.nameless_flag)
214 *************** extern machine_mode element_mode (const_
215 *** 1707,1719 ****
216 | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT)))
218 /* These flags are available for each language front end to use internally. */
219 ! #define TYPE_LANG_FLAG_0(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_0)
220 ! #define TYPE_LANG_FLAG_1(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_1)
221 ! #define TYPE_LANG_FLAG_2(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_2)
222 ! #define TYPE_LANG_FLAG_3(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_3)
223 ! #define TYPE_LANG_FLAG_4(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_4)
224 ! #define TYPE_LANG_FLAG_5(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_5)
225 ! #define TYPE_LANG_FLAG_6(NODE) (TYPE_CHECK (NODE)->type_common.lang_flag_6)
227 /* Used to keep track of visited nodes in tree traversals. This is set to
228 0 by copy_node and make_node. */
229 --- 1707,1719 ----
230 | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT)))
232 /* These flags are available for each language front end to use internally. */
233 ! #define TYPE_LANG_FLAG_0(NODE) (TYPE_CHECK (NODE)->lang_flag_0)
234 ! #define TYPE_LANG_FLAG_1(NODE) (TYPE_CHECK (NODE)->lang_flag_1)
235 ! #define TYPE_LANG_FLAG_2(NODE) (TYPE_CHECK (NODE)->lang_flag_2)
236 ! #define TYPE_LANG_FLAG_3(NODE) (TYPE_CHECK (NODE)->lang_flag_3)
237 ! #define TYPE_LANG_FLAG_4(NODE) (TYPE_CHECK (NODE)->lang_flag_4)
238 ! #define TYPE_LANG_FLAG_5(NODE) (TYPE_CHECK (NODE)->lang_flag_5)
239 ! #define TYPE_LANG_FLAG_6(NODE) (TYPE_CHECK (NODE)->lang_flag_6)
241 /* Used to keep track of visited nodes in tree traversals. This is set to
242 0 by copy_node and make_node. */
243 *************** extern machine_mode element_mode (const_
244 *** 1722,1737 ****
245 /* If set in an ARRAY_TYPE, indicates a string type (for languages
246 that distinguish string from array of char).
247 If set in a INTEGER_TYPE, indicates a character type. */
248 ! #define TYPE_STRING_FLAG(NODE) (TYPE_CHECK (NODE)->type_common.string_flag)
250 /* For a VECTOR_TYPE, this is the number of sub-parts of the vector. */
251 #define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
252 (((unsigned HOST_WIDE_INT) 1) \
253 ! << VECTOR_TYPE_CHECK (VECTOR_TYPE)->type_common.precision)
255 /* Set precision to n when we have 2^n sub-parts of the vector. */
256 #define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
257 ! (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type_common.precision = exact_log2 (X))
259 /* Nonzero in a VECTOR_TYPE if the frontends should not emit warnings
260 about missing conversions to other vector types of the same size. */
261 --- 1722,1737 ----
262 /* If set in an ARRAY_TYPE, indicates a string type (for languages
263 that distinguish string from array of char).
264 If set in a INTEGER_TYPE, indicates a character type. */
265 ! #define TYPE_STRING_FLAG(NODE) (TYPE_CHECK (NODE)->string_flag)
267 /* For a VECTOR_TYPE, this is the number of sub-parts of the vector. */
268 #define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
269 (((unsigned HOST_WIDE_INT) 1) \
270 ! << VECTOR_TYPE_CHECK (VECTOR_TYPE)->precision)
272 /* Set precision to n when we have 2^n sub-parts of the vector. */
273 #define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
274 ! (VECTOR_TYPE_CHECK (VECTOR_TYPE)->precision = exact_log2 (X))
276 /* Nonzero in a VECTOR_TYPE if the frontends should not emit warnings
277 about missing conversions to other vector types of the same size. */
278 *************** extern machine_mode element_mode (const_
279 *** 1741,1760 ****
280 /* Indicates that objects of this type must be initialized by calling a
281 function when they are created. */
282 #define TYPE_NEEDS_CONSTRUCTING(NODE) \
283 ! (TYPE_CHECK (NODE)->type_common.needs_constructing_flag)
285 /* Indicates that a UNION_TYPE object should be passed the same way that
286 the first union alternative would be passed, or that a RECORD_TYPE
287 object should be passed the same way that the first (and only) member
288 would be passed. */
289 #define TYPE_TRANSPARENT_AGGR(NODE) \
290 ! (RECORD_OR_UNION_CHECK (NODE)->type_common.transparent_aggr_flag)
292 /* For an ARRAY_TYPE, indicates that it is not permitted to take the
293 address of a component of the type. This is the counterpart of
294 DECL_NONADDRESSABLE_P for arrays, see the definition of this flag. */
295 #define TYPE_NONALIASED_COMPONENT(NODE) \
296 ! (ARRAY_TYPE_CHECK (NODE)->type_common.transparent_aggr_flag)
298 /* Indicated that objects of this type should be laid out in as
299 compact a way as possible. */
300 --- 1741,1760 ----
301 /* Indicates that objects of this type must be initialized by calling a
302 function when they are created. */
303 #define TYPE_NEEDS_CONSTRUCTING(NODE) \
304 ! (TYPE_CHECK (NODE)->needs_constructing_flag)
306 /* Indicates that a UNION_TYPE object should be passed the same way that
307 the first union alternative would be passed, or that a RECORD_TYPE
308 object should be passed the same way that the first (and only) member
309 would be passed. */
310 #define TYPE_TRANSPARENT_AGGR(NODE) \
311 ! (RECORD_OR_UNION_CHECK (NODE)->transparent_aggr_flag)
313 /* For an ARRAY_TYPE, indicates that it is not permitted to take the
314 address of a component of the type. This is the counterpart of
315 DECL_NONADDRESSABLE_P for arrays, see the definition of this flag. */
316 #define TYPE_NONALIASED_COMPONENT(NODE) \
317 ! (ARRAY_TYPE_CHECK (NODE)->transparent_aggr_flag)
319 /* Indicated that objects of this type should be laid out in as
320 compact a way as possible. */
321 *************** extern machine_mode element_mode (const_
322 *** 1764,1770 ****
323 Values are: 0 (unknown), 1 (false), 2 (true). Never access
324 this field directly. */
325 #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \
326 ! (TYPE_CHECK (NODE)->type_common.contains_placeholder_bits)
328 /* Nonzero if RECORD_TYPE represents a final derivation of class. */
329 #define TYPE_FINAL_P(NODE) \
330 --- 1764,1770 ----
331 Values are: 0 (unknown), 1 (false), 2 (true). Never access
332 this field directly. */
333 #define TYPE_CONTAINS_PLACEHOLDER_INTERNAL(NODE) \
334 ! (TYPE_CHECK (NODE)->contains_placeholder_bits)
336 /* Nonzero if RECORD_TYPE represents a final derivation of class. */
337 #define TYPE_FINAL_P(NODE) \
338 *************** extern machine_mode element_mode (const_
339 *** 1780,1796 ****
340 /* Symtab field as an integer. Used by stabs generator in dbxout.c to
341 hold the type's number in the generated stabs. */
342 #define TYPE_SYMTAB_ADDRESS(NODE) \
343 ! (TYPE_CHECK (NODE)->type_common.symtab.address)
345 /* Symtab field as a string. Used by COFF generator in sdbout.c to
346 hold struct/union type tag names. */
347 #define TYPE_SYMTAB_POINTER(NODE) \
348 ! (TYPE_CHECK (NODE)->type_common.symtab.pointer)
350 /* Symtab field as a pointer to a DWARF DIE. Used by DWARF generator
351 in dwarf2out.c to point to the DIE generated for the type. */
352 #define TYPE_SYMTAB_DIE(NODE) \
353 ! (TYPE_CHECK (NODE)->type_common.symtab.die)
355 /* The garbage collector needs to know the interpretation of the
356 symtab field. These constants represent the different types in the
357 --- 1780,1796 ----
358 /* Symtab field as an integer. Used by stabs generator in dbxout.c to
359 hold the type's number in the generated stabs. */
360 #define TYPE_SYMTAB_ADDRESS(NODE) \
361 ! (TYPE_CHECK (NODE)->symtab.address)
363 /* Symtab field as a string. Used by COFF generator in sdbout.c to
364 hold struct/union type tag names. */
365 #define TYPE_SYMTAB_POINTER(NODE) \
366 ! (TYPE_CHECK (NODE)->symtab.pointer)
368 /* Symtab field as a pointer to a DWARF DIE. Used by DWARF generator
369 in dwarf2out.c to point to the DIE generated for the type. */
370 #define TYPE_SYMTAB_DIE(NODE) \
371 ! (TYPE_CHECK (NODE)->symtab.die)
373 /* The garbage collector needs to know the interpretation of the
374 symtab field. These constants represent the different types in the
375 *************** extern machine_mode element_mode (const_
376 *** 1801,1850 ****
377 #define TYPE_SYMTAB_IS_DIE (2)
379 #define TYPE_LANG_SPECIFIC(NODE) \
380 ! (TYPE_CHECK (NODE)->type_common.lang_specific)
382 ! #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->type_common.values)
383 ! #define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->type_common.values)
384 #define TYPE_FIELDS(NODE) \
385 ! (RECORD_OR_UNION_CHECK (NODE)->type_common.values)
386 ! #define TYPE_CACHED_VALUES(NODE) (TYPE_CHECK (NODE)->type_common.values)
387 #define TYPE_ARG_TYPES(NODE) \
388 ! (FUNC_OR_METHOD_CHECK (NODE)->type_common.values)
389 ! #define TYPE_VALUES_RAW(NODE) (TYPE_CHECK (NODE)->type_common.values)
391 #define TYPE_METHODS(NODE) \
392 ! (RECORD_OR_UNION_CHECK (NODE)->type_common.maxval)
393 #define TYPE_VFIELD(NODE) \
394 ! (RECORD_OR_UNION_CHECK (NODE)->type_common.minval)
395 #define TYPE_METHOD_BASETYPE(NODE) \
396 ! (FUNC_OR_METHOD_CHECK (NODE)->type_common.maxval)
397 #define TYPE_OFFSET_BASETYPE(NODE) \
398 ! (OFFSET_TYPE_CHECK (NODE)->type_common.maxval)
399 ! #define TYPE_MAXVAL(NODE) (TYPE_CHECK (NODE)->type_common.maxval)
400 ! #define TYPE_MINVAL(NODE) (TYPE_CHECK (NODE)->type_common.minval)
401 #define TYPE_NEXT_PTR_TO(NODE) \
402 ! (POINTER_TYPE_CHECK (NODE)->type_common.minval)
403 #define TYPE_NEXT_REF_TO(NODE) \
404 ! (REFERENCE_TYPE_CHECK (NODE)->type_common.minval)
405 #define TYPE_MIN_VALUE(NODE) \
406 ! (NUMERICAL_TYPE_CHECK (NODE)->type_common.minval)
407 #define TYPE_MAX_VALUE(NODE) \
408 ! (NUMERICAL_TYPE_CHECK (NODE)->type_common.maxval)
410 /* If non-NULL, this is an upper bound of the size (in bytes) of an
411 object of the given ARRAY_TYPE_NON_COMMON. This allows temporaries to be
412 allocated. */
413 #define TYPE_ARRAY_MAX_SIZE(ARRAY_TYPE) \
414 ! (ARRAY_TYPE_CHECK (ARRAY_TYPE)->type_common.maxval)
416 ! #define TYPE_BINFO_RAW(NODE) (TYPE_CHECK (NODE)->type_common.binfo)
417 /* For record and union types, information about this type, as a base type
418 for itself. */
419 ! #define TYPE_BINFO(NODE) (RECORD_OR_UNION_CHECK (NODE)->type_common.binfo)
421 /* For non record and union types, used in a language-dependent way. */
422 #define TYPE_LANG_SLOT_1(NODE) \
423 ! (NOT_RECORD_OR_UNION_CHECK (NODE)->type_common.binfo)
425 /* Define accessor macros for information about type inheritance
426 and basetypes.
427 --- 1801,1850 ----
428 #define TYPE_SYMTAB_IS_DIE (2)
430 #define TYPE_LANG_SPECIFIC(NODE) \
431 ! (TYPE_CHECK (NODE)->lang_specific)
433 ! #define TYPE_VALUES(NODE) (ENUMERAL_TYPE_CHECK (NODE)->values)
434 ! #define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->values)
435 #define TYPE_FIELDS(NODE) \
436 ! (RECORD_OR_UNION_CHECK (NODE)->values)
437 ! #define TYPE_CACHED_VALUES(NODE) (TYPE_CHECK (NODE)->values)
438 #define TYPE_ARG_TYPES(NODE) \
439 ! (FUNC_OR_METHOD_CHECK (NODE)->values)
440 ! #define TYPE_VALUES_RAW(NODE) (TYPE_CHECK (NODE)->values)
442 #define TYPE_METHODS(NODE) \
443 ! (RECORD_OR_UNION_CHECK (NODE)->maxval)
444 #define TYPE_VFIELD(NODE) \
445 ! (RECORD_OR_UNION_CHECK (NODE)->minval)
446 #define TYPE_METHOD_BASETYPE(NODE) \
447 ! (FUNC_OR_METHOD_CHECK (NODE)->maxval)
448 #define TYPE_OFFSET_BASETYPE(NODE) \
449 ! (OFFSET_TYPE_CHECK (NODE)->maxval)
450 ! #define TYPE_MAXVAL(NODE) (TYPE_CHECK (NODE)->maxval)
451 ! #define TYPE_MINVAL(NODE) (TYPE_CHECK (NODE)->minval)
452 #define TYPE_NEXT_PTR_TO(NODE) \
453 ! (POINTER_TYPE_CHECK (NODE)->minval)
454 #define TYPE_NEXT_REF_TO(NODE) \
455 ! (REFERENCE_TYPE_CHECK (NODE)->minval)
456 #define TYPE_MIN_VALUE(NODE) \
457 ! (NUMERICAL_TYPE_CHECK (NODE)->minval)
458 #define TYPE_MAX_VALUE(NODE) \
459 ! (NUMERICAL_TYPE_CHECK (NODE)->maxval)
461 /* If non-NULL, this is an upper bound of the size (in bytes) of an
462 object of the given ARRAY_TYPE_NON_COMMON. This allows temporaries to be
463 allocated. */
464 #define TYPE_ARRAY_MAX_SIZE(ARRAY_TYPE) \
465 ! (ARRAY_TYPE_CHECK (ARRAY_TYPE)->maxval)
467 ! #define TYPE_BINFO_RAW(NODE) (TYPE_CHECK (NODE)->binfo)
468 /* For record and union types, information about this type, as a base type
469 for itself. */
470 ! #define TYPE_BINFO(NODE) (RECORD_OR_UNION_CHECK (NODE)->binfo)
472 /* For non record and union types, used in a language-dependent way. */
473 #define TYPE_LANG_SLOT_1(NODE) \
474 ! (NOT_RECORD_OR_UNION_CHECK (NODE)->binfo)
476 /* Define accessor macros for information about type inheritance
477 and basetypes.
478 *************** any_integral_type_check (const_tree __t,
479 *** 3230,3235 ****
480 --- 3230,3261 ----
482 #endif
484 + extern ttype tree_check (ttype, const char *, int, const char *, tree_code);
485 + extern ttype tree_check (const_ttype, const char *, int, const char *,
486 + tree_code);
488 + extern ttype tree_check2 (ttype, const char *, int, const char *,
489 + enum tree_code, enum tree_code);
490 + extern ttype tree_check3 (ttype, const char *, int, const char *,
491 + enum tree_code, enum tree_code, enum tree_code);
492 + extern ttype tree_not_check3 (ttype, const char *, int, const char *,
493 + enum tree_code, enum tree_code, enum tree_code);
494 + extern ttype tree_check5 (ttype, const char *, int, const char *,
495 + enum tree_code, enum tree_code, enum tree_code,
496 + enum tree_code, enum tree_code);
498 + extern const_ttype tree_check2 (const_ttype, const char *, int, const char *,
499 + enum tree_code, enum tree_code);
500 + extern const_ttype tree_check3 (const_ttype, const char *, int, const char *,
501 + enum tree_code, enum tree_code, enum tree_code);
502 + extern const_ttype tree_not_check3 (const_ttype, const char *, int,
503 + const char *, enum tree_code,
504 + enum tree_code, enum tree_code);
505 + extern const_ttype tree_check5 (const_ttype, const char *, int, const char *,
506 + enum tree_code, enum tree_code, enum tree_code,
507 + enum tree_code, enum tree_code);
510 /* Compute the number of operands in an expression node NODE. For
511 tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself,
512 otherwise it is looked up from the node's code. */