]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/cp-tree.h
(find_cross_jump): Don't allow old-style and volatile asms
[gcc.git] / gcc / cp / cp-tree.h
CommitLineData
8d08fdba 1/* Definitions for C++ parsing and type checking.
357a4089 2 Copyright (C) 1987, 93, 94, 95, 1996 Free Software Foundation, Inc.
8d08fdba
MS
3 Hacked by Michael Tiemann (tiemann@cygnus.com)
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU CC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU CC; see the file COPYING. If not, write to
e9fa0c7c
RK
19the Free Software Foundation, 59 Temple Place - Suite 330,
20Boston, MA 02111-1307, USA. */
8d08fdba
MS
21
22#ifndef _CP_TREE_H
23#define _CP_TREE_H
24
faf5394a 25#include "gansidecl.h"
8d08fdba
MS
26
27/* Language-dependent contents of an identifier. */
28
29struct lang_identifier
30{
31 struct tree_identifier ignore;
32 tree global_value, local_value;
33 tree class_value;
34 tree class_template_info;
35 struct lang_id2 *x;
36};
37
38struct lang_id2
39{
40 tree label_value, implicit_decl;
41 tree type_desc, as_list, error_locus;
42};
43
46b02c6d
MS
44typedef struct
45{
46 tree t;
47 int new_type_flag;
48} flagged_type_tree;
49
8d08fdba
MS
50/* To identify to the debug emitters if it should pay attention to the
51 flag `-Wtemplate-debugging'. */
52#define HAVE_TEMPLATES 1
53
54/* Macros for access to language-specific slots in an identifier. */
55
56#define IDENTIFIER_GLOBAL_VALUE(NODE) \
57 (((struct lang_identifier *)(NODE))->global_value)
58#define IDENTIFIER_CLASS_VALUE(NODE) \
59 (((struct lang_identifier *)(NODE))->class_value)
60#define IDENTIFIER_LOCAL_VALUE(NODE) \
61 (((struct lang_identifier *)(NODE))->local_value)
62#define IDENTIFIER_TEMPLATE(NODE) \
63 (((struct lang_identifier *)(NODE))->class_template_info)
64
65#define IDENTIFIER_TYPE_VALUE(NODE) (TREE_TYPE (NODE))
66#define SET_IDENTIFIER_TYPE_VALUE(NODE,TYPE) (TREE_TYPE (NODE) = TYPE)
67#define IDENTIFIER_HAS_TYPE_VALUE(NODE) (TREE_TYPE (NODE) ? 1 : 0)
8d08fdba
MS
68
69#define LANG_ID_FIELD(NAME,NODE) \
70 (((struct lang_identifier *)(NODE))->x \
71 ? ((struct lang_identifier *)(NODE))->x->NAME : 0)
72#define SET_LANG_ID(NODE,VALUE,NAME) \
73 (((struct lang_identifier *)(NODE))->x == 0 \
74 ? ((struct lang_identifier *)(NODE))->x \
75 = (struct lang_id2 *)perm_calloc (1, sizeof (struct lang_id2)) : 0, \
76 ((struct lang_identifier *)(NODE))->x->NAME = (VALUE))
77
78#define IDENTIFIER_LABEL_VALUE(NODE) LANG_ID_FIELD(label_value, NODE)
79#define SET_IDENTIFIER_LABEL_VALUE(NODE,VALUE) \
80 SET_LANG_ID(NODE, VALUE, label_value)
81
82#define IDENTIFIER_IMPLICIT_DECL(NODE) LANG_ID_FIELD(implicit_decl, NODE)
83#define SET_IDENTIFIER_IMPLICIT_DECL(NODE,VALUE) \
84 SET_LANG_ID(NODE, VALUE, implicit_decl)
85
86#define IDENTIFIER_AS_DESC(NODE) LANG_ID_FIELD(type_desc, NODE)
87#define SET_IDENTIFIER_AS_DESC(NODE,DESC) \
88 SET_LANG_ID(NODE, DESC, type_desc)
89
90#define IDENTIFIER_AS_LIST(NODE) LANG_ID_FIELD(as_list, NODE)
91#define SET_IDENTIFIER_AS_LIST(NODE,LIST) \
92 SET_LANG_ID(NODE, LIST, as_list)
93
94#define IDENTIFIER_ERROR_LOCUS(NODE) LANG_ID_FIELD(error_locus, NODE)
95#define SET_IDENTIFIER_ERROR_LOCUS(NODE,VALUE) \
96 SET_LANG_ID(NODE, VALUE, error_locus)
97
98
99#define IDENTIFIER_VIRTUAL_P(NODE) TREE_LANG_FLAG_1(NODE)
100
101/* Nonzero if this identifier is the prefix for a mangled C++ operator name. */
102#define IDENTIFIER_OPNAME_P(NODE) TREE_LANG_FLAG_2(NODE)
103
104#define IDENTIFIER_TYPENAME_P(NODE) \
105 (! strncmp (IDENTIFIER_POINTER (NODE), \
106 IDENTIFIER_POINTER (ansi_opname[(int) TYPE_EXPR]), \
107 IDENTIFIER_LENGTH (ansi_opname[(int) TYPE_EXPR])))
108
109/* Nonzero means reject anything that ANSI standard C forbids. */
110extern int pedantic;
111
112/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only. */
113#define C_TYPE_FIELDS_READONLY(type) TYPE_LANG_FLAG_0 (type)
e1cd6e56
MS
114
115/* Record in each node resulting from a binary operator
116 what operator was specified for it. */
117#define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp))
118
119/* Store a value in that field. */
120#define C_SET_EXP_ORIGINAL_CODE(exp, code) \
121 (TREE_COMPLEXITY (exp) = (int)(code))
8d08fdba
MS
122\f
123/* If non-zero, a VAR_DECL whose cleanup will cause a throw to the
124 next exception handler. */
125extern tree exception_throw_decl;
126
127extern tree double_type_node, long_double_type_node, float_type_node;
128extern tree char_type_node, unsigned_char_type_node, signed_char_type_node;
129extern tree ptrdiff_type_node;
130
131extern tree short_integer_type_node, short_unsigned_type_node;
132extern tree long_integer_type_node, long_unsigned_type_node;
133extern tree long_long_integer_type_node, long_long_unsigned_type_node;
134extern tree unsigned_type_node;
135extern tree string_type_node, char_array_type_node, int_array_type_node;
136extern tree wchar_array_type_node;
137extern tree wchar_type_node, signed_wchar_type_node, unsigned_wchar_type_node;
138extern tree intQI_type_node, unsigned_intQI_type_node;
139extern tree intHI_type_node, unsigned_intHI_type_node;
140extern tree intSI_type_node, unsigned_intSI_type_node;
141extern tree intDI_type_node, unsigned_intDI_type_node;
142
143extern int current_function_returns_value;
144extern int current_function_returns_null;
145extern tree current_function_return_value;
146
147extern tree ridpointers[];
148extern tree ansi_opname[];
149extern tree ansi_assopname[];
150
151/* Nonzero means `$' can be in an identifier. */
152
153extern int dollars_in_ident;
154
155/* Nonzero means allow type mismatches in conditional expressions;
156 just make their values `void'. */
157
158extern int flag_cond_mismatch;
159
160/* Nonzero means don't recognize the keyword `asm'. */
161
162extern int flag_no_asm;
163
164/* For cross referencing. */
165
166extern int flag_gnu_xref;
167
168/* For environments where you can use GNU binutils (as, ld in particular). */
169
170extern int flag_gnu_binutils;
171
172/* Nonzero means ignore `#ident' directives. */
173
174extern int flag_no_ident;
175
176/* Nonzero means warn about implicit declarations. */
177
178extern int warn_implicit;
179
180/* Nonzero means warn when all ctors or dtors are private, and the class
181 has no friends. */
182
183extern int warn_ctor_dtor_privacy;
184
185/* Nonzero means warn about function definitions that default the return type
186 or that use a null return and have a return-type other than void. */
187
188extern int warn_return_type;
189
190/* Nonzero means give string constants the type `const char *'
191 to get extra warnings from them. These warnings will be too numerous
192 to be useful, except in thoroughly ANSIfied programs. */
193
194extern int warn_write_strings;
195
196/* Nonzero means warn about sizeof(function) or addition/subtraction
197 of function pointers. */
198
199extern int warn_pointer_arith;
200
8d08fdba
MS
201/* Nonzero means warn about suggesting putting in ()'s. */
202
203extern int warn_parentheses;
204
205/* Nonzero means warn about multiple (redundant) decls for the same single
206 variable or function. */
207
208extern int warn_redundant_decls;
209
210/* Warn if initializer is not completely bracketed. */
211
212extern int warn_missing_braces;
213
2ee887f2
MS
214/* Warn about comparison of signed and unsigned values. */
215
216extern int warn_sign_compare;
217
8d08fdba
MS
218/* Warn about a subscript that has type char. */
219
220extern int warn_char_subscripts;
221
222/* Nonzero means warn about pointer casts that can drop a type qualifier
223 from the pointer target type. */
224
225extern int warn_cast_qual;
226
e92cc029 227/* Warn about *printf or *scanf format/argument anomalies. */
8d08fdba
MS
228
229extern int warn_format;
230
231/* Nonzero means warn about non virtual destructors in classes that have
e92cc029 232 virtual functions. */
8d08fdba
MS
233
234extern int warn_nonvdtor;
235
9a3b49ac
MS
236/* Non-zero means warn when we convert a pointer to member function
237 into a pointer to (void or function). */
238
239extern int warn_pmf2ptr;
240
8d08fdba
MS
241/* Non-zero means warn when a function is declared extern and later inline. */
242extern int warn_extern_inline;
243
8d08fdba
MS
244/* Nonzero means to treat bitfields as unsigned unless they say `signed'. */
245
246extern int flag_signed_bitfields;
247
248/* 3 means write out only virtuals function tables `defined'
249 in this implementation file.
250 2 means write out only specific virtual function tables
251 and give them (C) public access.
252 1 means write out virtual function tables and give them
253 (C) public access.
254 0 means write out virtual function tables and give them
255 (C) static access (default).
256 -1 means declare virtual function tables extern. */
257
258extern int write_virtuals;
259
8926095f
MS
260/* True for more efficient but incompatible (not not fully tested)
261 vtable implementation (using thunks).
e92cc029 262 0 is old behavior; 1 is new behavior. */
8926095f 263extern int flag_vtable_thunks;
51c184be 264
8d08fdba
MS
265/* INTERFACE_ONLY nonzero means that we are in an "interface"
266 section of the compiler. INTERFACE_UNKNOWN nonzero means
267 we cannot trust the value of INTERFACE_ONLY. If INTERFACE_UNKNOWN
268 is zero and INTERFACE_ONLY is zero, it means that we are responsible
269 for exporting definitions that others might need. */
270extern int interface_only, interface_unknown;
271
272/* Nonzero means we should attempt to elide constructors when possible. */
273
274extern int flag_elide_constructors;
275
e1cd6e56
MS
276/* Nonzero means enable obscure ANSI features and disable GNU extensions
277 that might cause ANSI-compliant code to be miscompiled. */
39211cd5
MS
278
279extern int flag_ansi;
280
c73964b2
MS
281/* Nonzero means do argument matching for overloading according to the
282 ANSI rules, rather than what g++ used to believe to be correct. */
283
284extern int flag_ansi_overloading;
285
8d08fdba
MS
286/* Nonzero means recognize and handle signature language constructs. */
287
288extern int flag_handle_signatures;
289
290/* Nonzero means that member functions defined in class scope are
291 inline by default. */
292
293extern int flag_default_inline;
8d08fdba
MS
294\f
295/* C++ language-specific tree codes. */
296#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
297enum cplus_tree_code {
298 __DUMMY = LAST_AND_UNUSED_TREE_CODE,
e92cc029 299#include "cp-tree.def"
8d08fdba
MS
300 LAST_CPLUS_TREE_CODE
301};
302#undef DEFTREECODE
303
8d08fdba
MS
304enum languages { lang_c, lang_cplusplus };
305
306/* Macros to make error reporting functions' lives easier. */
307#define TYPE_IDENTIFIER(NODE) (DECL_NAME (TYPE_NAME (NODE)))
308#define TYPE_NAME_STRING(NODE) (IDENTIFIER_POINTER (TYPE_IDENTIFIER (NODE)))
309#define TYPE_NAME_LENGTH(NODE) (IDENTIFIER_LENGTH (TYPE_IDENTIFIER (NODE)))
310
311#define TYPE_ASSEMBLER_NAME_STRING(NODE) (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (TYPE_NAME (NODE))))
312#define TYPE_ASSEMBLER_NAME_LENGTH(NODE) (IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (TYPE_NAME (NODE))))
313
a4443a08 314/* The _DECL for this _TYPE. */
d2e5ee5c 315#define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE)))
a4443a08 316
8d08fdba 317#define IS_AGGR_TYPE(t) (TYPE_LANG_FLAG_5 (t))
5566b478 318#define IS_AGGR_TYPE_CODE(t) (t == RECORD_TYPE || t == UNION_TYPE)
8d08fdba
MS
319#define IS_AGGR_TYPE_2(TYPE1,TYPE2) \
320 (TREE_CODE (TYPE1) == TREE_CODE (TYPE2) \
321 && IS_AGGR_TYPE (TYPE1)&IS_AGGR_TYPE (TYPE2))
6467930b
MS
322#define IS_OVERLOAD_TYPE(t) \
323 (IS_AGGR_TYPE (t) || TREE_CODE (t) == ENUMERAL_TYPE)
8d08fdba
MS
324
325/* In a *_TYPE, nonzero means a built-in type. */
326#define TYPE_BUILT_IN(NODE) TYPE_LANG_FLAG_6(NODE)
327
328/* Macros which might want to be replaced by function calls. */
329
21474714
MS
330#define DELTA_FROM_VTABLE_ENTRY(ENTRY) \
331 (!flag_vtable_thunks ? \
332 TREE_VALUE (CONSTRUCTOR_ELTS (ENTRY)) \
333 : TREE_CODE (TREE_OPERAND ((ENTRY), 0)) != THUNK_DECL ? integer_zero_node \
334 : build_int_2 (THUNK_DELTA (TREE_OPERAND ((ENTRY), 0)), 0))
8d08fdba
MS
335#if 1
336/* Virtual function addresses can be gotten from a virtual function
337 table entry using this macro. */
338#define FNADDR_FROM_VTABLE_ENTRY(ENTRY) \
8926095f
MS
339 (!flag_vtable_thunks ? \
340 TREE_VALUE (TREE_CHAIN (TREE_CHAIN (CONSTRUCTOR_ELTS (ENTRY)))) \
341 : TREE_CODE (TREE_OPERAND ((ENTRY), 0)) != THUNK_DECL ? (ENTRY) \
342 : DECL_INITIAL (TREE_OPERAND ((ENTRY), 0)))
8d08fdba
MS
343#define SET_FNADDR_FROM_VTABLE_ENTRY(ENTRY,VALUE) \
344 (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (CONSTRUCTOR_ELTS (ENTRY)))) = (VALUE))
8d08fdba
MS
345#define FUNCTION_ARG_CHAIN(NODE) (TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (NODE))))
346#define PROMOTES_TO_AGGR_TYPE(NODE,CODE) \
347 (((CODE) == TREE_CODE (NODE) \
348 && IS_AGGR_TYPE (TREE_TYPE (NODE))) \
349 || IS_AGGR_TYPE (NODE))
350
351#else
352#define FNADDR_FROM_VTABLE_ENTRY(ENTRY) (fnaddr_from_vtable_entry (ENTRY))
353#define SET_FNADDR_FROM_VTABLE_ENTRY(ENTRY,VALUE) \
354 (set_fnaddr_from_vtable_entry (ENTRY, VALUE))
355/* #define TYPE_NAME_STRING(NODE) (type_name_string (NODE)) */
356#define FUNCTION_ARG_CHAIN(NODE) (function_arg_chain (NODE))
357#define PROMOTES_TO_AGGR_TYPE(NODE,CODE) (promotes_to_aggr_type (NODE, CODE))
358/* #define IS_AGGR_TYPE_2(TYPE1, TYPE2) (is_aggr_type_2 (TYPE1, TYPE2)) */
359#endif
360/* Nonzero iff TYPE is uniquely derived from PARENT. Under MI, PARENT can
361 be an ambiguous base class of TYPE, and this macro will be false. */
362#define UNIQUELY_DERIVED_FROM_P(PARENT, TYPE) (get_base_distance (PARENT, TYPE, 0, (tree *)0) >= 0)
363#define ACCESSIBLY_DERIVED_FROM_P(PARENT, TYPE) (get_base_distance (PARENT, TYPE, -1, (tree *)0) >= 0)
364#define ACCESSIBLY_UNIQUELY_DERIVED_P(PARENT, TYPE) (get_base_distance (PARENT, TYPE, 1, (tree *)0) >= 0)
a0a33927 365#define DERIVED_FROM_P(PARENT, TYPE) (get_base_distance (PARENT, TYPE, 0, (tree *)0) != -1)
8d08fdba 366\f
8d08fdba
MS
367/* Statistics show that while the GNU C++ compiler may generate
368 thousands of different types during a compilation run, it
369 generates relatively few (tens) of classtypes. Because of this,
370 it is not costly to store a generous amount of information
371 in classtype nodes. This struct must fill out to a multiple of 4 bytes. */
372struct lang_type
373{
374 struct
375 {
376 unsigned has_type_conversion : 1;
377 unsigned has_int_conversion : 1;
378 unsigned has_float_conversion : 1;
379 unsigned has_init_ref : 1;
380 unsigned gets_init_aggr : 1;
381 unsigned has_assignment : 1;
382 unsigned has_default_ctor : 1;
383 unsigned uses_multiple_inheritance : 1;
384
385 unsigned has_nonpublic_ctor : 2;
386 unsigned has_nonpublic_assign_ref : 2;
387 unsigned const_needs_init : 1;
388 unsigned ref_needs_init : 1;
389 unsigned has_const_assign_ref : 1;
390 unsigned vtable_needs_writing : 1;
391
392 unsigned has_assign_ref : 1;
a28e3c7f
MS
393 unsigned gets_new : 2;
394 unsigned gets_delete : 2;
8d08fdba
MS
395 unsigned has_call_overloaded : 1;
396 unsigned has_array_ref_overloaded : 1;
397 unsigned has_arrow_overloaded : 1;
8d08fdba 398
a28e3c7f 399 unsigned local_typedecls : 1;
8d08fdba
MS
400 unsigned interface_only : 1;
401 unsigned interface_unknown : 1;
402 unsigned needs_virtual_reinit : 1;
db5ae43f 403 unsigned vec_delete_takes_size : 1;
8d08fdba
MS
404 unsigned declared_class : 1;
405 unsigned being_defined : 1;
406 unsigned redefined : 1;
8d08fdba 407
a28e3c7f 408 unsigned no_globalize : 1;
8d08fdba
MS
409 unsigned marked : 1;
410 unsigned marked2 : 1;
411 unsigned marked3 : 1;
412 unsigned marked4 : 1;
413 unsigned marked5 : 1;
414 unsigned marked6 : 1;
fc378698 415 unsigned debug_requested : 1;
8d08fdba 416
a28e3c7f 417 unsigned use_template : 2;
8d08fdba
MS
418 unsigned has_method_call_overloaded : 1;
419 unsigned private_attr : 1;
420 unsigned got_semicolon : 1;
421 unsigned ptrmemfunc_flag : 1;
422 unsigned is_signature : 1;
423 unsigned is_signature_pointer : 1;
8d08fdba 424
a28e3c7f 425 unsigned is_signature_reference : 1;
8d08fdba 426 unsigned has_default_implementation : 1;
8d08fdba
MS
427 unsigned has_opaque_typedecls : 1;
428 unsigned sigtable_has_been_generated : 1;
429 unsigned was_anonymous : 1;
430 unsigned has_real_assignment : 1;
431 unsigned has_real_assign_ref : 1;
432 unsigned has_const_init_ref : 1;
fc378698 433
8d08fdba
MS
434 unsigned has_complex_init_ref : 1;
435 unsigned has_complex_assign_ref : 1;
f0e01782 436 unsigned has_abstract_assign_ref : 1;
f30432d7 437 unsigned non_aggregate : 1;
8d08fdba
MS
438
439 /* The MIPS compiler gets it wrong if this struct also
440 does not fill out to a multiple of 4 bytes. Add a
441 member `dummy' with new bits if you go over the edge. */
fc378698 442 unsigned dummy : 20;
8d08fdba
MS
443
444 unsigned n_vancestors : 16;
445 } type_flags;
446
447 int cid;
448 int n_ancestors;
449 int vsize;
450 int max_depth;
451 int vfield_parent;
452
453 union tree_node *vbinfo[2];
454 union tree_node *baselink_vec;
455 union tree_node *vfields;
456 union tree_node *vbases;
457 union tree_node *vbase_size;
458
459 union tree_node *tags;
460 char *memoized_table_entry;
461
fc378698 462 union tree_node *search_slot;
8d08fdba
MS
463
464#ifdef ONLY_INT_FIELDS
465 unsigned int mode : 8;
466#else
467 enum machine_mode mode : 8;
468#endif
469
470 unsigned char size_unit;
471 unsigned char align;
472 unsigned char sep_unit;
473
474 union tree_node *sep;
475 union tree_node *size;
476
477 union tree_node *base_init_list;
478 union tree_node *abstract_virtuals;
479 union tree_node *as_list;
480 union tree_node *id_as_list;
481 union tree_node *binfo_as_list;
8d08fdba
MS
482 union tree_node *friend_classes;
483
484 char *mi_matrix;
8d08fdba 485
db5ae43f 486 union tree_node *rtti;
8d08fdba 487
51c184be
MS
488 union tree_node *methods;
489
8d08fdba
MS
490 union tree_node *signature;
491 union tree_node *signature_pointer_to;
492 union tree_node *signature_reference_to;
f376e137 493
5566b478
MS
494 union tree_node *template_info;
495
f376e137 496 int linenum;
8d08fdba
MS
497};
498
f376e137
MS
499#define CLASSTYPE_SOURCE_LINE(NODE) (TYPE_LANG_SPECIFIC(NODE)->linenum)
500
a0a33927
MS
501/* Indicates whether or not (and how) a template was expanded for this class.
502 0=no information yet/non-template class
503 1=implicit template instantiation
504 2=explicit template specialization
505 3=explicit template instantiation */
8d08fdba
MS
506#define CLASSTYPE_USE_TEMPLATE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.use_template)
507
508/* Fields used for storing information before the class is defined.
509 After the class is defined, these fields hold other information. */
510
511/* List of friends which were defined inline in this class definition. */
512#define CLASSTYPE_INLINE_FRIENDS(NODE) (TYPE_NONCOPIED_PARTS (NODE))
513
514/* Nonzero for _CLASSTYPE means that the _CLASSTYPE either has
515 a special meaning for the assignment operator ("operator="),
516 or one of its fields (or base members) has a special meaning
517 defined. */
518#define TYPE_HAS_ASSIGNMENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_assignment)
519#define TYPE_HAS_REAL_ASSIGNMENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_real_assignment)
520
521/* Nonzero for _CLASSTYPE means that operator new and delete are defined,
522 respectively. */
a28e3c7f
MS
523#define TYPE_GETS_NEW(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_new)
524#define TYPE_GETS_DELETE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_delete)
525#define TYPE_GETS_REG_DELETE(NODE) (TYPE_GETS_DELETE (NODE) & 1)
526
527/* Nonzero for _CLASSTYPE means that operator vec delete is defined and
528 takes the optional size_t argument. */
529#define TYPE_VEC_DELETE_TAKES_SIZE(NODE) \
530 (TYPE_LANG_SPECIFIC(NODE)->type_flags.vec_delete_takes_size)
531#define TYPE_VEC_NEW_USES_COOKIE(NODE) \
532 (TYPE_NEEDS_DESTRUCTOR (NODE) \
533 || (TYPE_LANG_SPECIFIC (NODE) && TYPE_VEC_DELETE_TAKES_SIZE (NODE)))
8d08fdba
MS
534
535/* Nonzero for TREE_LIST or _TYPE node means that this node is class-local. */
536#define TREE_NONLOCAL_FLAG(NODE) (TREE_LANG_FLAG_0 (NODE))
537
538/* Nonzero for a _CLASSTYPE node which we know to be private. */
539#define TYPE_PRIVATE_P(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.private_attr)
540
541/* Nonzero means that this _CLASSTYPE node defines ways of converting
542 itself to other types. */
543#define TYPE_HAS_CONVERSION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_type_conversion)
544
545/* Nonzero means that this _CLASSTYPE node can convert itself to an
546 INTEGER_TYPE. */
547#define TYPE_HAS_INT_CONVERSION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_int_conversion)
548
549/* Nonzero means that this _CLASSTYPE node can convert itself to an
550 REAL_TYPE. */
551#define TYPE_HAS_REAL_CONVERSION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_float_conversion)
552
553/* Nonzero means that this _CLASSTYPE node overloads operator=(X&). */
554#define TYPE_HAS_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_assign_ref)
555#define TYPE_HAS_CONST_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_const_assign_ref)
556
557/* Nonzero means that this _CLASSTYPE node has an X(X&) constructor. */
558#define TYPE_HAS_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_init_ref)
559#define TYPE_HAS_CONST_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_const_init_ref)
560
561/* Nonzero means that this _CLASSTYPE node has an X(X ...) constructor.
562 Note that there must be other arguments, or this constructor is flagged
563 as being erroneous. */
564#define TYPE_GETS_INIT_AGGR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_init_aggr)
565
566/* Nonzero means that this type is being defined. I.e., the left brace
567 starting the definition of this type has been seen. */
568#define TYPE_BEING_DEFINED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.being_defined)
569/* Nonzero means that this type has been redefined. In this case, if
570 convenient, don't reprocess any methods that appear in its redefinition. */
571#define TYPE_REDEFINED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.redefined)
572
573/* Nonzero means that this _CLASSTYPE node overloads the method call
574 operator. In this case, all method calls go through `operator->()(...). */
575#define TYPE_OVERLOADS_METHOD_CALL_EXPR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_method_call_overloaded)
576
577/* Nonzero means that this type is a signature. */
578# define IS_SIGNATURE(NODE) (TYPE_LANG_SPECIFIC(NODE)?TYPE_LANG_SPECIFIC(NODE)->type_flags.is_signature:0)
579# define SET_SIGNATURE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.is_signature=1)
580# define CLEAR_SIGNATURE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.is_signature=0)
581
582/* Nonzero means that this type is a signature pointer type. */
583# define IS_SIGNATURE_POINTER(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.is_signature_pointer)
584
585/* Nonzero means that this type is a signature reference type. */
586# define IS_SIGNATURE_REFERENCE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.is_signature_reference)
587
588/* Nonzero means that this signature type has a default implementation. */
589# define HAS_DEFAULT_IMPLEMENTATION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_default_implementation)
590
8d08fdba
MS
591/* Nonzero means that this signature contains opaque type declarations. */
592#define SIGNATURE_HAS_OPAQUE_TYPEDECLS(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_opaque_typedecls)
593
594/* Nonzero means that a signature table has been generated
595 for this signature. */
596#define SIGTABLE_HAS_BEEN_GENERATED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.sigtable_has_been_generated)
597
598/* If NODE is a class, this is the signature type that contains NODE's
599 signature after it has been computed using sigof(). */
600#define CLASSTYPE_SIGNATURE(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature)
601
602/* If NODE is a signature pointer or signature reference, this is the
603 signature type the pointer/reference points to. */
604#define SIGNATURE_TYPE(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature)
605
606/* If NODE is a signature, this is a vector of all methods defined
607 in the signature or in its base types together with their default
608 implementations. */
609#define SIGNATURE_METHOD_VEC(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature)
610
611/* If NODE is a signature, this is the _TYPE node that contains NODE's
612 signature pointer type. */
613#define SIGNATURE_POINTER_TO(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature_pointer_to)
614
615/* If NODE is a signature, this is the _TYPE node that contains NODE's
616 signature reference type. */
617#define SIGNATURE_REFERENCE_TO(NODE) (TYPE_LANG_SPECIFIC(NODE)->signature_reference_to)
618
db5ae43f
MS
619/* The is the VAR_DECL that contains NODE's rtti. */
620#define CLASSTYPE_RTTI(NODE) (TYPE_LANG_SPECIFIC(NODE)->rtti)
8d08fdba
MS
621
622/* Nonzero means that this _CLASSTYPE node overloads operator(). */
623#define TYPE_OVERLOADS_CALL_EXPR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_call_overloaded)
624
625/* Nonzero means that this _CLASSTYPE node overloads operator[]. */
626#define TYPE_OVERLOADS_ARRAY_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_array_ref_overloaded)
627
628/* Nonzero means that this _CLASSTYPE node overloads operator->. */
629#define TYPE_OVERLOADS_ARROW(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_arrow_overloaded)
630
631/* Nonzero means that this _CLASSTYPE (or one of its ancestors) uses
632 multiple inheritance. If this is 0 for the root of a type
633 hierarchy, then we can use more efficient search techniques. */
634#define TYPE_USES_MULTIPLE_INHERITANCE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.uses_multiple_inheritance)
635
636/* Nonzero means that this _CLASSTYPE (or one of its ancestors) uses
637 virtual base classes. If this is 0 for the root of a type
638 hierarchy, then we can use more efficient search techniques. */
639#define TYPE_USES_VIRTUAL_BASECLASSES(NODE) (TREE_LANG_FLAG_3(NODE))
640
641/* List of lists of member functions defined in this class. */
72b7eeff 642#define CLASSTYPE_METHOD_VEC(NODE) (TYPE_LANG_SPECIFIC(NODE)->methods)
8d08fdba 643
e1cd6e56
MS
644/* The first type conversion operator in the class (the others can be
645 searched with TREE_CHAIN), or the first non-constructor function if
646 there are no type conversion operators. */
647#define CLASSTYPE_FIRST_CONVERSION(NODE) \
fc378698
MS
648 TREE_VEC_LENGTH (CLASSTYPE_METHOD_VEC (NODE)) > 2 \
649 ? TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (NODE), 2) \
8ccc31eb 650 : NULL_TREE;
e1cd6e56 651
8d08fdba
MS
652/* Pointer from any member function to the head of the list of
653 member functions of the type that member function belongs to. */
654#define CLASSTYPE_BASELINK_VEC(NODE) (TYPE_LANG_SPECIFIC(NODE)->baselink_vec)
655
656/* Mark bits for depth-first and breath-first searches. */
657#define CLASSTYPE_MARKED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked)
658#define CLASSTYPE_MARKED2(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked2)
659#define CLASSTYPE_MARKED3(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked3)
660#define CLASSTYPE_MARKED4(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked4)
661#define CLASSTYPE_MARKED5(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked5)
662#define CLASSTYPE_MARKED6(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked6)
663/* Macros to modify the above flags */
664#define SET_CLASSTYPE_MARKED(NODE) (CLASSTYPE_MARKED(NODE) = 1)
665#define CLEAR_CLASSTYPE_MARKED(NODE) (CLASSTYPE_MARKED(NODE) = 0)
666#define SET_CLASSTYPE_MARKED2(NODE) (CLASSTYPE_MARKED2(NODE) = 1)
667#define CLEAR_CLASSTYPE_MARKED2(NODE) (CLASSTYPE_MARKED2(NODE) = 0)
668#define SET_CLASSTYPE_MARKED3(NODE) (CLASSTYPE_MARKED3(NODE) = 1)
669#define CLEAR_CLASSTYPE_MARKED3(NODE) (CLASSTYPE_MARKED3(NODE) = 0)
670#define SET_CLASSTYPE_MARKED4(NODE) (CLASSTYPE_MARKED4(NODE) = 1)
671#define CLEAR_CLASSTYPE_MARKED4(NODE) (CLASSTYPE_MARKED4(NODE) = 0)
672#define SET_CLASSTYPE_MARKED5(NODE) (CLASSTYPE_MARKED5(NODE) = 1)
673#define CLEAR_CLASSTYPE_MARKED5(NODE) (CLASSTYPE_MARKED5(NODE) = 0)
674#define SET_CLASSTYPE_MARKED6(NODE) (CLASSTYPE_MARKED6(NODE) = 1)
675#define CLEAR_CLASSTYPE_MARKED6(NODE) (CLASSTYPE_MARKED6(NODE) = 0)
676
677#define CLASSTYPE_TAGS(NODE) (TYPE_LANG_SPECIFIC(NODE)->tags)
678
679/* If this class has any bases, this is the number of the base class from
680 which our VFIELD is based, -1 otherwise. If this class has no base
681 classes, this is not used.
682 In D : B1, B2, PARENT would be 0, if D's vtable came from B1,
e92cc029 683 1, if D's vtable came from B2. */
8d08fdba
MS
684#define CLASSTYPE_VFIELD_PARENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->vfield_parent)
685
686/* Remove when done merging. */
687#define CLASSTYPE_VFIELD(NODE) TYPE_VFIELD(NODE)
688
689/* The number of virtual functions defined for this
690 _CLASSTYPE node. */
691#define CLASSTYPE_VSIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->vsize)
692/* The virtual base classes that this type uses. */
693#define CLASSTYPE_VBASECLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->vbases)
694/* The virtual function pointer fields that this type contains. */
695#define CLASSTYPE_VFIELDS(NODE) (TYPE_LANG_SPECIFIC(NODE)->vfields)
696
697/* Number of baseclasses defined for this type.
698 0 means no base classes. */
699#define CLASSTYPE_N_BASECLASSES(NODE) \
700 (TYPE_BINFO_BASETYPES (NODE) ? TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES(NODE)) : 0)
701
702/* Memoize the number of super classes (base classes) tha this node
703 has. That way we can know immediately (albeit conservatively how
704 large a multiple-inheritance matrix we need to build to find
705 derivation information. */
706#define CLASSTYPE_N_SUPERCLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->n_ancestors)
707#define CLASSTYPE_N_VBASECLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.n_vancestors)
708
709/* Record how deep the inheritance is for this class so `void*' conversions
710 are less favorable than a conversion to the most base type. */
711#define CLASSTYPE_MAX_DEPTH(NODE) (TYPE_LANG_SPECIFIC(NODE)->max_depth)
712
713/* Used for keeping search-specific information. Any search routine
714 which uses this must define what exactly this slot is used for. */
715#define CLASSTYPE_SEARCH_SLOT(NODE) (TYPE_LANG_SPECIFIC(NODE)->search_slot)
716
717/* Entry for keeping memoization tables for this type to
718 hopefully speed up search routines. Since it is a pointer,
719 it can mean almost anything. */
720#define CLASSTYPE_MTABLE_ENTRY(NODE) (TYPE_LANG_SPECIFIC(NODE)->memoized_table_entry)
721
722/* This is the total size of the baseclasses defined for this type.
723 Needed because it is desirable to layout such information
724 before beginning to process the class itself, and we
725 don't want to compute it second time when actually laying
726 out the type for real. */
727#define CLASSTYPE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->size)
728#define CLASSTYPE_SIZE_UNIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->size_unit)
729#define CLASSTYPE_MODE(NODE) (TYPE_LANG_SPECIFIC(NODE)->mode)
730#define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align)
731
732/* This is the space needed for virtual base classes. NULL if
733 there are no virtual basetypes. */
734#define CLASSTYPE_VBASE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->vbase_size)
735
736/* A cons list of structure elements which either have constructors
737 to be called, or virtual function table pointers which
738 need initializing. Depending on what is being initialized,
739 the TREE_PURPOSE and TREE_VALUE fields have different meanings:
740
741 Member initialization: <FIELD_DECL, TYPE>
742 Base class construction: <NULL_TREE, BASETYPE>
743 Base class initialization: <BASE_INITIALIZATION, THESE_INITIALIZATIONS>
744 Whole type: <MEMBER_INIT, BASE_INIT>. */
745#define CLASSTYPE_BASE_INIT_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->base_init_list)
746
747/* A cons list of virtual functions which cannot be inherited by
748 derived classes. When deriving from this type, the derived
749 class must provide its own definition for each of these functions. */
750#define CLASSTYPE_ABSTRACT_VIRTUALS(NODE) (TYPE_LANG_SPECIFIC(NODE)->abstract_virtuals)
751
752/* Nonzero means that this aggr type has been `closed' by a semicolon. */
753#define CLASSTYPE_GOT_SEMICOLON(NODE) (TYPE_LANG_SPECIFIC (NODE)->type_flags.got_semicolon)
754
755/* Nonzero means that the main virtual function table pointer needs to be
756 set because base constructors have placed the wrong value there.
757 If this is zero, it means that they placed the right value there,
758 and there is no need to change it. */
759#define CLASSTYPE_NEEDS_VIRTUAL_REINIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.needs_virtual_reinit)
760
761/* Nonzero means that if this type has virtual functions, that
762 the virtual function table will be written out. */
763#define CLASSTYPE_VTABLE_NEEDS_WRITING(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.vtable_needs_writing)
764
765/* Nonzero means that this type defines its own local type declarations. */
766#define CLASSTYPE_LOCAL_TYPEDECLS(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.local_typedecls)
767
768/* Nonzero means that this type has an X() constructor. */
769#define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_default_ctor)
770
771/* Nonzero means the type declared a ctor as private or protected. We
772 use this to make sure we don't try to generate a copy ctor for a
773 class that has a member of type NODE. */
774#define TYPE_HAS_NONPUBLIC_CTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_nonpublic_ctor)
775
776/* Ditto, for operator=. */
777#define TYPE_HAS_NONPUBLIC_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_nonpublic_assign_ref)
778
779/* Many routines need to cons up a list of basetypes for access
780 checking. This field contains a TREE_LIST node whose TREE_VALUE
781 is the main variant of the type, and whose TREE_VIA_PUBLIC
782 and TREE_VIA_VIRTUAL bits are correctly set. */
783#define CLASSTYPE_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->as_list)
784/* Same, but cache a list whose value is the name of this type. */
785#define CLASSTYPE_ID_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->id_as_list)
786/* Same, but cache a list whose value is the binfo of this type. */
787#define CLASSTYPE_BINFO_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->binfo_as_list)
788
8d08fdba
MS
789/* A list of class types with which this type is a friend. */
790#define CLASSTYPE_FRIEND_CLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->friend_classes)
791
792/* Keep an inheritance lattice around so we can quickly tell whether
793 a type is derived from another or not. */
794#define CLASSTYPE_MI_MATRIX(NODE) (TYPE_LANG_SPECIFIC(NODE)->mi_matrix)
795
8d08fdba
MS
796/* Say whether this node was declared as a "class" or a "struct". */
797#define CLASSTYPE_DECLARED_CLASS(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.declared_class)
8d08fdba
MS
798/* whether this can be globalized. */
799#define CLASSTYPE_NO_GLOBALIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.no_globalize)
800
801/* Nonzero if this class has const members which have no specified initialization. */
802#define CLASSTYPE_READONLY_FIELDS_NEED_INIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.const_needs_init)
803
804/* Nonzero if this class has ref members which have no specified initialization. */
805#define CLASSTYPE_REF_FIELDS_NEED_INIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.ref_needs_init)
806
807/* Nonzero if this class is included from a header file which employs
808 `#pragma interface', and it is not included in its implementation file. */
809#define CLASSTYPE_INTERFACE_ONLY(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_only)
810
811/* Same as above, but for classes whose purpose we do not know. */
812#define CLASSTYPE_INTERFACE_UNKNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown)
813#define CLASSTYPE_INTERFACE_KNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown == 0)
814#define SET_CLASSTYPE_INTERFACE_UNKNOWN_X(NODE,X) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown = !!(X))
815#define SET_CLASSTYPE_INTERFACE_UNKNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown = 1)
816#define SET_CLASSTYPE_INTERFACE_KNOWN(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.interface_unknown = 0)
817
818/* Nonzero if a _DECL node requires us to output debug info for this class. */
819#define CLASSTYPE_DEBUG_REQUESTED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.debug_requested)
820\f
821/* Additional macros for inheritance information. */
822
823#define CLASSTYPE_VBINFO(NODE,VIA_PUBLIC) \
824 (TYPE_LANG_SPECIFIC (NODE)->vbinfo[VIA_PUBLIC])
825
826/* When following an binfo-specific chain, this is the cumulative
827 via-public flag. */
828#define BINFO_VIA_PUBLIC(NODE) TREE_LANG_FLAG_5 (NODE)
829
830/* When building a matrix to determine by a single lookup
831 whether one class is derived from another or not,
832 this field is the index of the class in the table. */
833#define CLASSTYPE_CID(NODE) (TYPE_LANG_SPECIFIC(NODE)->cid)
834#define BINFO_CID(NODE) CLASSTYPE_CID(BINFO_TYPE(NODE))
835
836/* Nonzero means marked by DFS or BFS search, including searches
837 by `get_binfo' and `get_base_distance'. */
838#define BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED(BINFO_TYPE(NODE)):TREE_LANG_FLAG_0(NODE))
839/* Macros needed because of C compilers that don't allow conditional
840 expressions to be lvalues. Grr! */
841#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=1))
842#define CLEAR_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=0))
843
844/* Nonzero means marked in building initialization list. */
845#define BINFO_BASEINIT_MARKED(NODE) CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
846/* Modifier macros */
847#define SET_BINFO_BASEINIT_MARKED(NODE) SET_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
848#define CLEAR_BINFO_BASEINIT_MARKED(NODE) CLEAR_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
849
850/* Nonzero means marked in search through virtual inheritance hierarchy. */
851#define BINFO_VBASE_MARKED(NODE) CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
852/* Modifier macros */
853#define SET_BINFO_VBASE_MARKED(NODE) SET_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
854#define CLEAR_BINFO_VBASE_MARKED(NODE) CLEAR_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
855
856/* Nonzero means marked in search for members or member functions. */
857#define BINFO_FIELDS_MARKED(NODE) \
858 (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED2 (BINFO_TYPE (NODE)):TREE_LANG_FLAG_2(NODE))
859#define SET_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=1))
860#define CLEAR_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=0))
861
862/* Nonzero means that this class is on a path leading to a new vtable. */
863#define BINFO_VTABLE_PATH_MARKED(NODE) \
864 (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):TREE_LANG_FLAG_3(NODE))
865#define SET_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=1))
866#define CLEAR_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=0))
867
868/* Nonzero means that this class has a new vtable. */
869#define BINFO_NEW_VTABLE_MARKED(NODE) \
870 (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):TREE_LANG_FLAG_4(NODE))
871#define SET_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=1))
872#define CLEAR_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=0))
873
874/* Nonzero means this class has initialized its virtual baseclasses. */
875#define BINFO_VBASE_INIT_MARKED(NODE) \
876 (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED5(BINFO_TYPE(NODE)):TREE_LANG_FLAG_5(NODE))
877#define SET_BINFO_VBASE_INIT_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED5(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_5(NODE)=1))
878#define CLEAR_BINFO_VBASE_INIT_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED5(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_5(NODE)=0))
879\f
880/* Accessor macros for the vfield slots in structures. */
881
882/* Get the assoc info that caused this vfield to exist. */
883#define VF_BINFO_VALUE(NODE) TREE_PURPOSE (NODE)
884
885/* Get that same information as a _TYPE. */
886#define VF_BASETYPE_VALUE(NODE) TREE_VALUE (NODE)
887
888/* Get the value of the top-most type dominating the non-`normal' vfields. */
889#define VF_DERIVED_VALUE(NODE) (VF_BINFO_VALUE (NODE) ? BINFO_TYPE (VF_BINFO_VALUE (NODE)) : NULL_TREE)
890
891/* Get the value of the top-most type that's `normal' for the vfield. */
892#define VF_NORMAL_VALUE(NODE) TREE_TYPE (NODE)
893\f
894/* Nonzero for TREE_LIST node means that this list of things
895 is a list of parameters, as opposed to a list of expressions. */
896#define TREE_PARMLIST(NODE) ((NODE)->common.unsigned_flag) /* overloaded! */
897
898/* For FUNCTION_TYPE or METHOD_TYPE, a list of the exceptions that
899 this type can raise. */
900#define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_NONCOPIED_PARTS (NODE)
a9aedbc2 901
e92cc029 902/* The binding level associated with the namespace. */
72b7eeff 903#define NAMESPACE_LEVEL(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.level)
8d08fdba
MS
904\f
905struct lang_decl_flags
906{
907#ifdef ONLY_INT_FIELDS
908 int language : 8;
909#else
910 enum languages language : 8;
911#endif
912
913 unsigned operator_attr : 1;
914 unsigned constructor_attr : 1;
915 unsigned returns_first_arg : 1;
916 unsigned preserves_first_arg : 1;
917 unsigned friend_attr : 1;
918 unsigned static_function : 1;
919 unsigned const_memfunc : 1;
920 unsigned volatile_memfunc : 1;
921
922 unsigned abstract_virtual : 1;
923 unsigned permanent_attr : 1 ;
924 unsigned constructor_for_vbase_attr : 1;
925 unsigned mutable_flag : 1;
926 unsigned is_default_implementation : 1;
8926095f 927 unsigned saved_inline : 1;
a0a33927
MS
928 unsigned use_template : 2;
929
faae18ab 930 unsigned c_static : 1;
db5ae43f 931 unsigned nonconverting : 1;
faae18ab
MS
932 unsigned declared_inline : 1;
933 unsigned not_really_extern : 1;
934 unsigned dummy : 4;
8d08fdba
MS
935
936 tree access;
937 tree context;
938 tree memfunc_pointer_to;
5566b478 939 tree template_info;
72b7eeff 940 struct binding_level *level;
8d08fdba
MS
941};
942
943struct lang_decl
944{
945 struct lang_decl_flags decl_flags;
946
8d08fdba
MS
947 tree main_decl_variant;
948 struct pending_inline *pending_inline_info;
8d08fdba
MS
949 tree chain;
950};
951
952/* Non-zero if NODE is a _DECL with TREE_READONLY set. */
953#define TREE_READONLY_DECL_P(NODE) \
954 (TREE_READONLY (NODE) && TREE_CODE_CLASS (TREE_CODE (NODE)) == 'd')
955
cffa8729
MS
956/* Non-zero iff DECL is memory-based. The DECL_RTL of
957 certain const variables might be a CONST_INT, or a REG
958 in some cases. We cannot use `memory_operand' as a test
959 here because on most RISC machines, a variable's address
960 is not, by itself, a legitimate address. */
961#define DECL_IN_MEMORY_P(NODE) \
962 (DECL_RTL (NODE) != NULL_RTX && GET_CODE (DECL_RTL (NODE)) == MEM)
963
8d08fdba
MS
964/* For FUNCTION_DECLs: return the language in which this decl
965 was declared. */
966#define DECL_LANGUAGE(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.language)
967
968/* For FUNCTION_DECLs: nonzero means that this function is a constructor. */
969#define DECL_CONSTRUCTOR_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_attr)
970/* For FUNCTION_DECLs: nonzero means that this function is a constructor
971 for an object with virtual baseclasses. */
972#define DECL_CONSTRUCTOR_FOR_VBASE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_for_vbase_attr)
973
974/* For FUNCTION_DECLs: nonzero means that this function is a default
975 implementation of a signature method. */
976#define IS_DEFAULT_IMPLEMENTATION(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.is_default_implementation)
977
978/* For FUNCTION_DECLs: nonzero means that the constructor
979 is known to return a non-zero `this' unchanged. */
980#define DECL_RETURNS_FIRST_ARG(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.returns_first_arg)
981
982/* Nonzero for FUNCTION_DECL means that this constructor is known to
983 not make any assignment to `this', and therefore can be trusted
4ac14744 984 to return it unchanged. Otherwise, we must re-assign `current_class_ptr'
8d08fdba
MS
985 after performing base initializations. */
986#define DECL_PRESERVES_THIS(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.preserves_first_arg)
987
988/* Nonzero for _DECL means that this decl appears in (or will appear
989 in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for
990 detecting circularity in case members are multiply defined. In the
991 case of a VAR_DECL, it is also used to determine how program storage
992 should be allocated. */
993#define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3(NODE))
994
995/* Nonzero for FUNCTION_DECL means that this decl is just a
996 friend declaration, and should not be added to the list of
997 member functions for this class. */
998#define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.friend_attr)
999
1000/* Nonzero for FUNCTION_DECL means that this decl is a static
1001 member function. */
1002#define DECL_STATIC_FUNCTION_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.static_function)
1003
700f8a87
MS
1004/* Nonzero for a class member means that it is shared between all objects
1005 of that class. */
1006#define SHARED_MEMBER_P(NODE) \
1007 (TREE_CODE (NODE) == VAR_DECL || TREE_CODE (NODE) == TYPE_DECL \
1008 || TREE_CODE (NODE) == CONST_DECL)
1009
8926095f
MS
1010/* Nonzero for FUNCTION_DECL means that this decl is a member function
1011 (static or non-static). */
1012#define DECL_FUNCTION_MEMBER_P(NODE) \
1013 (TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE || DECL_STATIC_FUNCTION_P (NODE))
1014
8d08fdba
MS
1015/* Nonzero for FUNCTION_DECL means that this member function
1016 has `this' as const X *const. */
1017#define DECL_CONST_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.const_memfunc)
1018
1019/* Nonzero for FUNCTION_DECL means that this member function
1020 has `this' as volatile X *const. */
1021#define DECL_VOLATILE_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.volatile_memfunc)
1022
1023/* Nonzero for _DECL means that this member object type
1024 is mutable. */
1025#define DECL_MUTABLE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.mutable_flag)
1026
db5ae43f
MS
1027/* Nonzero for _DECL means that this constructor is a non-converting
1028 constructor. */
1029#define DECL_NONCONVERTING_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.nonconverting)
1030
8d08fdba
MS
1031/* Nonzero for FUNCTION_DECL means that this member function
1032 exists as part of an abstract class's interface. */
1033#define DECL_ABSTRACT_VIRTUAL_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.abstract_virtual)
1034
1035/* Nonzero if allocated on permanent_obstack. */
1036#define LANG_DECL_PERMANENT(LANGDECL) ((LANGDECL)->decl_flags.permanent_attr)
1037
8926095f
MS
1038/* The _TYPE context in which this _DECL appears. This field holds the
1039 class where a virtual function instance is actually defined, and the
1040 lexical scope of a friend function defined in a class body. */
8d08fdba 1041#define DECL_CLASS_CONTEXT(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.context)
f30432d7
MS
1042#define DECL_REAL_CONTEXT(NODE) \
1043 ((TREE_CODE (NODE) == FUNCTION_DECL && DECL_FUNCTION_MEMBER_P (NODE)) \
1044 ? DECL_CLASS_CONTEXT (NODE) : DECL_CONTEXT (NODE))
8d08fdba
MS
1045
1046/* For a FUNCTION_DECL: the chain through which the next method
5566b478
MS
1047 with the same name is found. We now use TREE_CHAIN to
1048 walk through the methods in order of declaration. */
8d08fdba
MS
1049#if 1
1050#define DECL_CHAIN(NODE) (DECL_LANG_SPECIFIC(NODE)->chain)
1051#else
1052#define DECL_CHAIN(NODE) (TREE_CHAIN (NODE))
1053#endif
1054
d2ad151f 1055/* In a VAR_DECL for a variable declared in a for statement,
e92cc029 1056 this is the shadowed (local) variable. */
d2ad151f
PB
1057#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT(NODE)
1058
8d08fdba
MS
1059/* Points back to the decl which caused this lang_decl to be allocated. */
1060#define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)
1061
1062/* For a FUNCTION_DECL: if this function was declared inline inside of
1063 a class declaration, this is where the text for the function is
1064 squirreled away. */
1065#define DECL_PENDING_INLINE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->pending_inline_info)
1066
e92cc029 1067/* True if on the saved_inlines (see decl2.c) list. */
8926095f
MS
1068#define DECL_SAVED_INLINE(DECL) \
1069 (DECL_LANG_SPECIFIC(DECL)->decl_flags.saved_inline)
1070
8d08fdba
MS
1071/* For a FUNCTION_DECL: if this function was declared inside a signature
1072 declaration, this is the corresponding member function pointer that was
1073 created for it. */
1074#define DECL_MEMFUNC_POINTER_TO(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.memfunc_pointer_to)
1075
1076/* For a FIELD_DECL: this points to the signature member function from
1077 which this signature member function pointer was created. */
1078#define DECL_MEMFUNC_POINTING_TO(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.memfunc_pointer_to)
1079
5566b478
MS
1080/* For a VAR_DECL or FUNCTION_DECL: template-specific information. */
1081#define DECL_TEMPLATE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.template_info)
1082#define CLASSTYPE_TEMPLATE_INFO(NODE) (TYPE_LANG_SPECIFIC(NODE)->template_info)
1083#define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))
1084#define TI_ARGS(NODE) (TREE_VALUE (NODE))
1085#define TI_USES_TEMPLATE_PARMS(NODE) TREE_LANG_FLAG_0 (NODE)
1086#define DECL_TI_TEMPLATE(NODE) TI_TEMPLATE (DECL_TEMPLATE_INFO (NODE))
1087#define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE))
1088#define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
1089#define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))
1090
1091#define DECL_SAVED_TREE(NODE) DECL_MEMFUNC_POINTER_TO (NODE)
1092#define COMPOUND_STMT_NO_SCOPE(NODE) TREE_LANG_FLAG_0 (NODE)
1093#define NEW_EXPR_USE_GLOBAL(NODE) TREE_LANG_FLAG_0 (NODE)
1094#define DELETE_EXPR_USE_GLOBAL(NODE) TREE_LANG_FLAG_0 (NODE)
1095#define DELETE_EXPR_USE_VEC(NODE) TREE_LANG_FLAG_1 (NODE)
1096#define LOOKUP_EXPR_GLOBAL(NODE) TREE_LANG_FLAG_0 (NODE)
8d08fdba 1097
de22184b
MS
1098/* For a TREE_LIST node representing a function parm type and its default arg,
1099 did the default arg come from a template? */
1100#define PARM_DEFAULT_FROM_TEMPLATE(NODE) TREE_LANG_FLAG_0 (NODE)
1101
8d08fdba
MS
1102/* Nonzero in INT_CST means that this int is negative by dint of
1103 using a twos-complement negated operand. */
1104#define TREE_NEGATED_INT(NODE) (TREE_LANG_FLAG_0 (NODE))
1105
1106/* Nonzero in any kind of _EXPR or _REF node means that it is a call
1107 to a storage allocation routine. If, later, alternate storage
1108 is found to hold the object, this call can be ignored. */
1109#define TREE_CALLS_NEW(NODE) (TREE_LANG_FLAG_1 (NODE))
1110
1111/* Nonzero in any kind of _TYPE that uses multiple inheritance
1112 or virtual baseclasses. */
1113#define TYPE_USES_COMPLEX_INHERITANCE(NODE) (TREE_LANG_FLAG_1 (NODE))
1114
a80e4195 1115#if 0 /* UNUSED */
8d2733ca
MS
1116/* Nonzero in IDENTIFIER_NODE means that this name is not the name the user
1117 gave; it's a DECL_NESTED_TYPENAME. Someone may want to set this on
1118 mangled function names, too, but it isn't currently. */
1119#define TREE_MANGLED(NODE) (TREE_LANG_FLAG_0 (NODE))
a80e4195 1120#endif
8d2733ca 1121
7177d104 1122#if 0 /* UNUSED */
8d08fdba
MS
1123/* Nonzero in IDENTIFIER_NODE means that this name is overloaded, and
1124 should be looked up in a non-standard way. */
73aad9b9 1125#define DECL_OVERLOADED(NODE) (FOO)
8926095f 1126#endif
8d08fdba
MS
1127
1128/* Nonzero if this (non-TYPE)_DECL has its virtual attribute set.
1129 For a FUNCTION_DECL, this is when the function is a virtual function.
1130 For a VAR_DECL, this is when the variable is a virtual function table.
1131 For a FIELD_DECL, when the field is the field for the virtual function table.
1132 For an IDENTIFIER_NODE, nonzero if any function with this name
1133 has been declared virtual.
1134
1135 For a _TYPE if it uses virtual functions (or is derived from
1136 one that does). */
1137#define TYPE_VIRTUAL_P(NODE) (TREE_LANG_FLAG_2 (NODE))
1138
1139#if 0
1140/* Same, but tells if this field is private in current context. */
e3417fcd 1141#define DECL_PRIVATE(NODE) (FOO)
8d08fdba
MS
1142
1143/* Same, but tells if this field is private in current context. */
1144#define DECL_PROTECTED(NODE) (DECL_LANG_FLAG_6 (NODE))
1145
1146#define DECL_PUBLIC(NODE) (DECL_LANG_FLAG_7 (NODE))
1147#endif
1148
d2ad151f
PB
1149extern int flag_new_for_scope;
1150
1151/* This flag is true of a local VAR_DECL if it was declared in a for
e92cc029 1152 statement, but we are no longer in the scope of the for. */
d2ad151f
PB
1153#define DECL_DEAD_FOR_LOCAL(NODE) DECL_LANG_FLAG_7 (NODE)
1154
1155/* This flag is set on a VAR_DECL that is a DECL_DEAD_FOR_LOCAL
1156 if we already emitted a warning about using it. */
1157#define DECL_ERROR_REPORTED(NODE) DECL_LANG_FLAG_0 (NODE)
1158
700f8a87 1159/* This _DECL represents a compiler-generated entity. */
863adfc0 1160#define SET_DECL_ARTIFICIAL(NODE) (DECL_ARTIFICIAL (NODE) = 1)
8d08fdba
MS
1161
1162/* Record whether a typedef for type `int' was actually `signed int'. */
1163#define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))
1164
1165/* Nonzero if the type T promotes to itself.
1166 ANSI C states explicitly the list of types that promote;
1167 in particular, short promotes to int even if they have the same width. */
1168#define C_PROMOTING_INTEGER_TYPE_P(t) \
1169 (TREE_CODE ((t)) == INTEGER_TYPE \
1170 && (TYPE_MAIN_VARIANT (t) == char_type_node \
1171 || TYPE_MAIN_VARIANT (t) == signed_char_type_node \
1172 || TYPE_MAIN_VARIANT (t) == unsigned_char_type_node \
1173 || TYPE_MAIN_VARIANT (t) == short_integer_type_node \
1174 || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node))
1175
2986ae00
MS
1176#define INTEGRAL_CODE_P(CODE) \
1177 (CODE == INTEGER_TYPE || CODE == ENUMERAL_TYPE || CODE == BOOLEAN_TYPE)
1178#define ARITHMETIC_TYPE_P(TYPE) (INTEGRAL_TYPE_P (TYPE) || FLOAT_TYPE_P (TYPE))
1179
8d08fdba
MS
1180/* Mark which labels are explicitly declared.
1181 These may be shadowed, and may be referenced from nested functions. */
1182#define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
1183
1184/* Record whether a type or decl was written with nonconstant size.
1185 Note that TYPE_SIZE may have simplified to a constant. */
1186#define C_TYPE_VARIABLE_SIZE(type) TREE_LANG_FLAG_4 (type)
1187#define C_DECL_VARIABLE_SIZE(type) DECL_LANG_FLAG_8 (type)
1188
1189/* Nonzero for _TYPE means that the _TYPE defines
1190 at least one constructor. */
1191#define TYPE_HAS_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1(NODE))
1192
1193/* When appearing in an INDIRECT_REF, it means that the tree structure
1194 underneath is actually a call to a constructor. This is needed
1195 when the constructor must initialize local storage (which can
1196 be automatically destroyed), rather than allowing it to allocate
1197 space from the heap.
1198
1199 When appearing in a SAVE_EXPR, it means that underneath
1200 is a call to a constructor.
1201
1202 When appearing in a CONSTRUCTOR, it means that it was
1203 a GNU C constructor expression.
1204
1205 When appearing in a FIELD_DECL, it means that this field
1206 has been duly initialized in its constructor. */
1207#define TREE_HAS_CONSTRUCTOR(NODE) (TREE_LANG_FLAG_4(NODE))
1208
a3203465
MS
1209#define EMPTY_CONSTRUCTOR_P(NODE) (TREE_CODE (NODE) == CONSTRUCTOR \
1210 && CONSTRUCTOR_ELTS (NODE) == NULL_TREE)
1211
8d08fdba
MS
1212/* Indicates that a NON_LVALUE_EXPR came from a C++ reference.
1213 Used to generate more helpful error message in case somebody
1214 tries to take its address. */
1215#define TREE_REFERENCE_EXPR(NODE) (TREE_LANG_FLAG_3(NODE))
1216
1217/* Nonzero for _TYPE means that the _TYPE defines a destructor. */
1218#define TYPE_HAS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_2(NODE))
1219
f55c7d88 1220#if 0
8d08fdba
MS
1221/* Nonzero for _TYPE node means that creating an object of this type
1222 will involve a call to a constructor. This can apply to objects
1223 of ARRAY_TYPE if the type of the elements needs a constructor. */
1224#define TYPE_NEEDS_CONSTRUCTING(NODE) (TYPE_LANG_FLAG_3(NODE))
f55c7d88 1225#endif
8d08fdba 1226
f30432d7
MS
1227/* Nonzero means that an object of this type can not be initialized using
1228 an initializer list. */
1229#define CLASSTYPE_NON_AGGREGATE(NODE) \
1230 (TYPE_LANG_SPECIFIC (NODE)->type_flags.non_aggregate)
1231#define TYPE_NON_AGGREGATE_CLASS(NODE) \
1232 (IS_AGGR_TYPE (NODE) && CLASSTYPE_NON_AGGREGATE (NODE))
1233
8d08fdba
MS
1234/* Nonzero if there is a user-defined X::op=(x&) for this class. */
1235#define TYPE_HAS_REAL_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_real_assign_ref)
1236#define TYPE_HAS_COMPLEX_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_complex_assign_ref)
f0e01782 1237#define TYPE_HAS_ABSTRACT_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_abstract_assign_ref)
8d08fdba
MS
1238#define TYPE_HAS_COMPLEX_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_complex_init_ref)
1239
1240/* Nonzero for _TYPE node means that destroying an object of this type
1241 will involve a call to a destructor. This can apply to objects
1242 of ARRAY_TYPE is the type of the elements needs a destructor. */
1243#define TYPE_NEEDS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_4(NODE))
1244
e8abc66f
MS
1245/* Nonzero for class type means that initialization of this type can use
1246 a bitwise copy. */
1247#define TYPE_HAS_TRIVIAL_INIT_REF(NODE) \
1248 (TYPE_HAS_INIT_REF (NODE) && ! TYPE_HAS_COMPLEX_INIT_REF (NODE))
1249
1250/* Nonzero for class type means that assignment of this type can use
1251 a bitwise copy. */
1252#define TYPE_HAS_TRIVIAL_ASSIGN_REF(NODE) \
1253 (TYPE_HAS_ASSIGN_REF (NODE) && ! TYPE_HAS_COMPLEX_ASSIGN_REF (NODE))
1254
c11b6f21
MS
1255#define TYPE_PTRMEM_P(NODE) \
1256 (TREE_CODE (NODE) == POINTER_TYPE \
1257 && TREE_CODE (TREE_TYPE (NODE)) == OFFSET_TYPE)
1258#define TYPE_PTR_P(NODE) \
1259 (TREE_CODE (NODE) == POINTER_TYPE \
1260 && TREE_CODE (TREE_TYPE (NODE)) != OFFSET_TYPE)
1261#define TYPE_PTROB_P(NODE) \
1262 (TYPE_PTR_P (NODE) && TREE_CODE (TREE_TYPE (NODE)) != FUNCTION_TYPE \
1263 && TREE_CODE (TREE_TYPE (NODE)) != VOID_TYPE)
1264#define TYPE_PTROBV_P(NODE) \
1265 (TYPE_PTR_P (NODE) && TREE_CODE (TREE_TYPE (NODE)) != FUNCTION_TYPE)
1266#define TYPE_PTRFN_P(NODE) \
1267 (TREE_CODE (NODE) == POINTER_TYPE \
1268 && TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE)
1269
8d08fdba 1270/* Nonzero for _TYPE node means that this type is a pointer to member
e92cc029 1271 function type. */
8d08fdba
MS
1272#define TYPE_PTRMEMFUNC_P(NODE) (TREE_CODE(NODE) == RECORD_TYPE && TYPE_LANG_SPECIFIC(NODE)->type_flags.ptrmemfunc_flag)
1273#define TYPE_PTRMEMFUNC_FLAG(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.ptrmemfunc_flag)
1274/* Get the POINTER_TYPE to the METHOD_TYPE associated with this
1275 pointer to member function. TYPE_PTRMEMFUNC_P _must_ be true,
e92cc029 1276 before using this macro. */
8d08fdba
MS
1277#define TYPE_PTRMEMFUNC_FN_TYPE(NODE) (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (TREE_CHAIN (TREE_CHAIN (TYPE_FIELDS (NODE)))))))
1278/* These are use to manipulate the the canonical RECORD_TYPE from the
e92cc029 1279 hashed POINTER_TYPE, and can only be used on the POINTER_TYPE. */
8d08fdba
MS
1280#define TYPE_GET_PTRMEMFUNC_TYPE(NODE) ((tree)TYPE_LANG_SPECIFIC(NODE))
1281#define TYPE_SET_PTRMEMFUNC_TYPE(NODE, VALUE) (TYPE_LANG_SPECIFIC(NODE) = ((struct lang_type *)(void*)(VALUE)))
e92cc029 1282/* These are to get the delta2 and pfn fields from a TYPE_PTRMEMFUNC_P. */
4dabb379
MS
1283#define DELTA2_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, NULL_TREE, 0), delta2_identifier, NULL_TREE, 0))
1284#define PFN_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, NULL_TREE, 0), pfn_identifier, NULL_TREE, 0))
8d08fdba 1285
faae18ab 1286/* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was
8926095f 1287 specified in its declaration. */
8d08fdba
MS
1288#define DECL_THIS_EXTERN(NODE) (DECL_LANG_FLAG_2(NODE))
1289
faae18ab
MS
1290/* Nonzero for VAR_DECL and FUNCTION_DECL node means that `static' was
1291 specified in its declaration. */
1292#define DECL_THIS_STATIC(NODE) (DECL_LANG_FLAG_6(NODE))
1293
8d08fdba
MS
1294/* Nonzero for SAVE_EXPR if used to initialize a PARM_DECL. */
1295#define PARM_DECL_EXPR(NODE) (TREE_LANG_FLAG_2(NODE))
1296
1297/* Nonzero in FUNCTION_DECL means it is really an operator.
1298 Just used to communicate formatting information to dbxout.c. */
1299#define DECL_OPERATOR(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.operator_attr)
1300
1301#define ANON_UNION_P(NODE) (DECL_NAME (NODE) == 0)
1302
1303#define UNKNOWN_TYPE LANG_TYPE
1304
1305/* Define fields and accessors for nodes representing declared names. */
1306
1307#if 0
1308/* C++: A derived class may be able to directly use the virtual
1309 function table of a base class. When it does so, it may
1310 still have a decl node used to access the virtual function
1311 table (so that variables of this type can initialize their
1312 virtual function table pointers by name). When such thievery
1313 is committed, know exactly which base class's virtual function
1314 table is the one being stolen. This effectively computes the
1315 transitive closure. */
1316#define DECL_VPARENT(NODE) ((NODE)->decl.arguments)
1317#endif
1318
8d08fdba
MS
1319#define TYPE_WAS_ANONYMOUS(NODE) (TYPE_LANG_SPECIFIC (NODE)->type_flags.was_anonymous)
1320
1321/* C++: all of these are overloaded! These apply only to TYPE_DECLs. */
1322#define DECL_FRIENDLIST(NODE) (DECL_INITIAL (NODE))
8d08fdba
MS
1323
1324/* The DECL_ACCESS is used to record under which context
1325 special access rules apply. */
1326#define DECL_ACCESS(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.access)
1327
1328/* C++: all of these are overloaded!
1329 These apply to PARM_DECLs and VAR_DECLs. */
1330#define DECL_REFERENCE_SLOT(NODE) ((tree)(NODE)->decl.arguments)
1331#define SET_DECL_REFERENCE_SLOT(NODE,VAL) ((NODE)->decl.arguments=VAL)
1332
8d08fdba 1333/* Accessor macros for C++ template decl nodes. */
8d08fdba
MS
1334#define DECL_TEMPLATE_PARMS(NODE) DECL_ARGUMENTS(NODE)
1335/* For class templates. */
73aad9b9 1336#define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE(NODE)
8d08fdba
MS
1337/* For function, method, class-data templates. */
1338#define DECL_TEMPLATE_RESULT(NODE) DECL_RESULT(NODE)
1339#define DECL_TEMPLATE_INSTANTIATIONS(NODE) DECL_VINDEX(NODE)
5566b478
MS
1340#define DECL_TEMPLATE_INJECT(NODE) DECL_INITIAL(NODE)
1341
1342#define DECL_FUNCTION_TEMPLATE_P(NODE) \
1343 (TREE_CODE (NODE) == TEMPLATE_DECL \
1344 && TREE_CODE (DECL_TEMPLATE_RESULT (NODE)) == FUNCTION_DECL)
1345
1346#define PRIMARY_TEMPLATE_P(NODE) \
1347 (TREE_TYPE (DECL_TEMPLATE_PARMS (NODE)) == (NODE))
1348
1349#define CLASSTYPE_TEMPLATE_LEVEL(NODE) \
1350 (TREE_INT_CST_HIGH (TREE_PURPOSE (CLASSTYPE_TI_TEMPLATE (NODE))))
8d08fdba 1351
a0a33927
MS
1352/* Indicates whether or not (and how) a template was expanded for this
1353 FUNCTION_DECL or VAR_DECL.
1354 0=normal declaration, e.g. int min (int, int);
1355 1=implicit template instantiation
1356 2=explicit template specialization, e.g. int min<int> (int, int);
e92cc029 1357 3=explicit template instantiation, e.g. template int min<int> (int, int); */
a0a33927
MS
1358#define DECL_USE_TEMPLATE(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.use_template)
1359
1360#define DECL_TEMPLATE_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) & 1)
1361#define CLASSTYPE_TEMPLATE_INSTANTIATION(NODE) \
1362 (CLASSTYPE_USE_TEMPLATE (NODE) & 1)
1363
1364#define DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) == 2)
1365#define SET_DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) = 2)
1366#define CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \
1367 (CLASSTYPE_USE_TEMPLATE (NODE) == 2)
1368#define SET_CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \
1369 (CLASSTYPE_USE_TEMPLATE (NODE) = 2)
1370
1371#define DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 1)
1372#define SET_DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 1)
1373#define CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \
1374 (CLASSTYPE_USE_TEMPLATE(NODE) == 1)
1375#define SET_CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \
1376 (CLASSTYPE_USE_TEMPLATE(NODE) = 1)
1377
1378#define DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 3)
1379#define SET_DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 3)
1380#define CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \
1381 (CLASSTYPE_USE_TEMPLATE(NODE) == 3)
1382#define SET_CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \
1383 (CLASSTYPE_USE_TEMPLATE(NODE) = 3)
7177d104 1384
73aad9b9
JM
1385/* This function may be a guiding decl for a template. */
1386#define DECL_MAYBE_TEMPLATE(NODE) DECL_LANG_FLAG_4 (NODE)
db5ae43f 1387/* We know what we're doing with this decl now. */
e3417fcd 1388#define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE)
db5ae43f 1389
faae18ab
MS
1390/* This decl was declared or deduced to have internal linkage. This is
1391 only meaningful if TREE_PUBLIC is set. */
1392#define DECL_C_STATIC(NODE) \
1393 (DECL_LANG_SPECIFIC (NODE)->decl_flags.c_static)
1394
1395/* This function was declared inline. This flag controls the linkage
1396 semantics of 'inline'; whether or not the function is inlined is
1397 controlled by DECL_INLINE. */
1398#define DECL_THIS_INLINE(NODE) \
1399 (DECL_LANG_SPECIFIC (NODE)->decl_flags.declared_inline)
1400
1401/* DECL_EXTERNAL must be set on a decl until the decl is actually emitted,
1402 so that assemble_external will work properly. So we have this flag to
1403 tell us whether the decl is really not external. */
1404#define DECL_NOT_REALLY_EXTERN(NODE) \
1405 (DECL_LANG_SPECIFIC (NODE)->decl_flags.not_really_extern)
db5ae43f 1406
6b5fbb55
MS
1407#define DECL_REALLY_EXTERN(NODE) \
1408 (DECL_EXTERNAL (NODE) && ! DECL_NOT_REALLY_EXTERN (NODE))
1409
db5ae43f 1410#define DECL_PUBLIC(NODE) \
faae18ab
MS
1411 (TREE_CODE (NODE) == FUNCTION_DECL \
1412 ? ! DECL_C_STATIC (NODE) : TREE_PUBLIC (NODE))
db5ae43f 1413
39211cd5 1414#define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i)
8926095f 1415
8d08fdba
MS
1416/* ...and for unexpanded-parameterized-type nodes. */
1417#define UPT_TEMPLATE(NODE) TREE_PURPOSE(TYPE_VALUES(NODE))
1418#define UPT_PARMS(NODE) TREE_VALUE(TYPE_VALUES(NODE))
1419
72b7eeff
MS
1420#define builtin_function(NAME, TYPE, CODE, LIBNAME) \
1421 define_function (NAME, TYPE, CODE, (void (*)())pushdecl, LIBNAME)
1422
8d08fdba
MS
1423/* An enumeration of the kind of tags that C++ accepts. */
1424enum tag_types { record_type, class_type, union_type, enum_type,
db5ae43f 1425 signature_type };
8d08fdba
MS
1426
1427/* Zero means prototype weakly, as in ANSI C (no args means nothing).
1428 Each language context defines how this variable should be set. */
1429extern int strict_prototype;
1430extern int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus;
1431
1432/* Non-zero means that if a label exists, and no other identifier
1433 applies, use the value of the label. */
1434extern int flag_labels_ok;
1435
1436/* Non-zero means to collect statistics which might be expensive
1437 and to print them when we are done. */
1438extern int flag_detailed_statistics;
1439
1440/* Non-zero means warn in function declared in derived class has the
1441 same name as a virtual in the base class, but fails to match the
1442 type signature of any virtual function in the base class. */
1443extern int warn_overloaded_virtual;
1444
1445/* in c-common.c */
1446extern void declare_function_name PROTO((void));
820b778a 1447extern void decl_attributes PROTO((tree, tree, tree));
8d08fdba
MS
1448extern void init_function_format_info PROTO((void));
1449extern void record_function_format PROTO((tree, tree, int, int, int));
1450extern void check_function_format PROTO((tree, tree, tree));
1451/* Print an error message for invalid operands to arith operation CODE.
1452 NOP_EXPR is used as a special case (see truthvalue_conversion). */
1453extern void binary_op_error PROTO((enum tree_code));
f376e137 1454extern tree cp_build_type_variant PROTO((tree, int, int));
8d08fdba
MS
1455extern void c_expand_expr_stmt PROTO((tree));
1456/* Validate the expression after `case' and apply default promotions. */
1457extern tree check_case_value PROTO((tree));
1458/* Concatenate a list of STRING_CST nodes into one STRING_CST. */
1459extern tree combine_strings PROTO((tree));
1460extern void constant_expression_warning PROTO((tree));
1461extern tree convert_and_check PROTO((tree, tree));
1462extern void overflow_warning PROTO((tree));
1463extern void unsigned_conversion_warning PROTO((tree, tree));
1464/* Read the rest of the current #-directive line. */
1465extern char *get_directive_line STDIO_PROTO((FILE *));
1466/* Subroutine of build_binary_op, used for comparison operations.
1467 See if the operands have both been converted from subword integer types
1468 and, if so, perhaps change them both back to their original type. */
1469extern tree shorten_compare PROTO((tree *, tree *, tree *, enum tree_code *));
1470/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
e92cc029 1471 or validate its data type for an `if' or `while' statement or ?..: exp. */
8d08fdba
MS
1472extern tree truthvalue_conversion PROTO((tree));
1473extern tree type_for_mode PROTO((enum machine_mode, int));
1474extern tree type_for_size PROTO((unsigned, int));
1475
51c184be 1476/* in decl{2}.c */
8d08fdba
MS
1477extern tree void_list_node;
1478extern tree void_zero_node;
1479extern tree default_function_type;
1480extern tree vtable_entry_type;
1481extern tree sigtable_entry_type;
db5ae43f 1482extern tree __t_desc_type_node;
5566b478 1483#if 0
db5ae43f 1484extern tree __tp_desc_type_node;
5566b478 1485#endif
db5ae43f
MS
1486extern tree __access_mode_type_node;
1487extern tree __bltn_desc_type_node, __user_desc_type_node;
1488extern tree __class_desc_type_node, __attr_desc_type_node;
1489extern tree __ptr_desc_type_node, __func_desc_type_node;
1490extern tree __ptmf_desc_type_node, __ptmd_desc_type_node;
1491extern tree type_info_type_node;
8d08fdba
MS
1492extern tree class_star_type_node;
1493extern tree this_identifier;
fc378698 1494extern tree ctor_identifier, dtor_identifier;
8d08fdba
MS
1495extern tree pfn_identifier;
1496extern tree index_identifier;
1497extern tree delta_identifier;
1498extern tree delta2_identifier;
1499extern tree pfn_or_delta2_identifier;
46b49f6c 1500extern tree tag_identifier;
4abea095 1501extern tree vt_off_identifier;
8d08fdba
MS
1502
1503/* A node that is a list (length 1) of error_mark_nodes. */
1504extern tree error_mark_list;
1505
1506extern tree ptr_type_node, const_ptr_type_node;
1507extern tree class_type_node, record_type_node, union_type_node, enum_type_node;
db5ae43f 1508extern tree unknown_type_node;
8d08fdba
MS
1509extern tree opaque_type_node, signature_type_node;
1510
700f8a87 1511/* Node for "pointer to (virtual) function".
e92cc029 1512 This may be distinct from ptr_type_node so gdb can distinguish them. */
700f8a87
MS
1513#define vfunc_ptr_type_node \
1514 (flag_vtable_thunks ? vtable_entry_type : ptr_type_node)
1515
8d08fdba
MS
1516/* Array type `(void *)[]' */
1517extern tree vtbl_type_node;
1518extern tree delta_type_node;
1519
1520extern tree long_long_integer_type_node, long_long_unsigned_type_node;
1521/* For building calls to `delete'. */
1522extern tree integer_two_node, integer_three_node;
28ed4616 1523extern tree boolean_type_node, boolean_true_node, boolean_false_node;
8d08fdba 1524
d11ad92e
MS
1525extern tree null_node;
1526
51c184be 1527/* in pt.c */
5566b478
MS
1528
1529extern tree current_template_parms;
1530extern HOST_WIDE_INT processing_template_decl;
8d08fdba
MS
1531
1532/* The template currently being instantiated, and where the instantiation
1533 was triggered. */
1534struct tinst_level
1535{
5566b478 1536 tree decl;
8d08fdba
MS
1537 int line;
1538 char *file;
1539 struct tinst_level *next;
1540};
1541
5566b478
MS
1542extern int minimal_parse_mode;
1543
51c184be 1544/* in class.c */
8d08fdba
MS
1545extern tree current_class_name;
1546extern tree current_class_type;
1547extern tree previous_class_type;
1548
1549extern tree current_lang_name, lang_name_cplusplus, lang_name_c;
1550
1551/* Points to the name of that function. May not be the DECL_NAME
1552 of CURRENT_FUNCTION_DECL due to overloading */
1553extern tree original_function_name;
1554
4ac14744
MS
1555extern tree current_class_name, current_class_type;
1556extern tree current_class_ptr, current_class_ref;
8d08fdba 1557
51c184be 1558/* in init.c */
8d08fdba
MS
1559extern tree global_base_init_list;
1560extern tree current_base_init_list, current_member_init_list;
1561
8d08fdba
MS
1562extern int current_function_just_assigned_this;
1563extern int current_function_parms_stored;
1564\f
1565/* Here's where we control how name mangling takes place. */
1566
1567#define OPERATOR_ASSIGN_FORMAT "__a%s"
1568#define OPERATOR_FORMAT "__%s"
1569#define OPERATOR_TYPENAME_FORMAT "__op"
1570#define OPERATOR_TYPENAME_P(ID_NODE) \
1571 (IDENTIFIER_POINTER (ID_NODE)[0] == '_' \
1572 && IDENTIFIER_POINTER (ID_NODE)[1] == '_' \
1573 && IDENTIFIER_POINTER (ID_NODE)[2] == 'o' \
1574 && IDENTIFIER_POINTER (ID_NODE)[3] == 'p')
1575
1576
1577/* Cannot use '$' up front, because this confuses gdb
1578 (names beginning with '$' are gdb-local identifiers).
1579
1580 Note that all forms in which the '$' is significant are long enough
1581 for direct indexing (meaning that if we know there is a '$'
1582 at a particular location, we can index into the string at
1583 any other location that provides distinguishing characters). */
1584
1585/* Define NO_DOLLAR_IN_LABEL in your favorite tm file if your assembler
1586 doesn't allow '$' in symbol names. */
1587#ifndef NO_DOLLAR_IN_LABEL
1588
1589#define JOINER '$'
1590
1591#define VPTR_NAME "$v"
1592#define THROW_NAME "$eh_throw"
1593#define DESTRUCTOR_DECL_PREFIX "_$_"
1594#define AUTO_VTABLE_NAME "__vtbl$me__"
1595#define AUTO_TEMP_NAME "_$tmp_"
1596#define AUTO_TEMP_FORMAT "_$tmp_%d"
1597#define VTABLE_BASE "$vb"
a0a33927 1598#define VTABLE_NAME_FORMAT (flag_vtable_thunks ? "__vt_%s" : "_vt$%s")
8d08fdba
MS
1599#define VFIELD_BASE "$vf"
1600#define VFIELD_NAME "_vptr$"
1601#define VFIELD_NAME_FORMAT "_vptr$%s"
1602#define VBASE_NAME "_vb$"
1603#define VBASE_NAME_FORMAT "_vb$%s"
1604#define STATIC_NAME_FORMAT "_%s$%s"
1605#define ANON_AGGRNAME_FORMAT "$_%d"
1606
1607#else /* NO_DOLLAR_IN_LABEL */
1608
1609#ifndef NO_DOT_IN_LABEL
1610
1611#define JOINER '.'
1612
1613#define VPTR_NAME ".v"
1614#define THROW_NAME ".eh_throw"
1615#define DESTRUCTOR_DECL_PREFIX "_._"
1616#define AUTO_VTABLE_NAME "__vtbl.me__"
1617#define AUTO_TEMP_NAME "_.tmp_"
1618#define AUTO_TEMP_FORMAT "_.tmp_%d"
1619#define VTABLE_BASE ".vb"
a0a33927 1620#define VTABLE_NAME_FORMAT (flag_vtable_thunks ? "__vt_%s" : "_vt.%s")
8d08fdba
MS
1621#define VFIELD_BASE ".vf"
1622#define VFIELD_NAME "_vptr."
1623#define VFIELD_NAME_FORMAT "_vptr.%s"
1624#define VBASE_NAME "_vb."
1625#define VBASE_NAME_FORMAT "_vb.%s"
1626#define STATIC_NAME_FORMAT "_%s.%s"
1627
1628#define ANON_AGGRNAME_FORMAT "._%d"
1629
1630#else /* NO_DOT_IN_LABEL */
1631
1632#define VPTR_NAME "__vptr"
1633#define VPTR_NAME_P(ID_NODE) \
1634 (!strncmp (IDENTIFIER_POINTER (ID_NODE), VPTR_NAME, sizeof (VPTR_NAME) - 1))
1635#define THROW_NAME "__eh_throw"
1636#define DESTRUCTOR_DECL_PREFIX "__destr_"
1637#define DESTRUCTOR_NAME_P(ID_NODE) \
1638 (!strncmp (IDENTIFIER_POINTER (ID_NODE), DESTRUCTOR_DECL_PREFIX, \
1639 sizeof (DESTRUCTOR_DECL_PREFIX) - 1))
1640#define IN_CHARGE_NAME "__in_chrg"
1641#define AUTO_VTABLE_NAME "__vtbl_me__"
1642#define AUTO_TEMP_NAME "__tmp_"
1643#define TEMP_NAME_P(ID_NODE) \
1644 (!strncmp (IDENTIFIER_POINTER (ID_NODE), AUTO_TEMP_NAME, \
1645 sizeof (AUTO_TEMP_NAME) - 1))
1646#define AUTO_TEMP_FORMAT "__tmp_%d"
1647#define VTABLE_BASE "__vtb"
1648#define VTABLE_NAME "__vt_"
a0a33927 1649#define VTABLE_NAME_FORMAT (flag_vtable_thunks ? "__vt_%s" : "_vt_%s")
8d08fdba
MS
1650#define VTABLE_NAME_P(ID_NODE) \
1651 (!strncmp (IDENTIFIER_POINTER (ID_NODE), VTABLE_NAME, \
1652 sizeof (VTABLE_NAME) - 1))
1653#define VFIELD_BASE "__vfb"
1654#define VFIELD_NAME "__vptr_"
1655#define VFIELD_NAME_P(ID_NODE) \
1656 (!strncmp (IDENTIFIER_POINTER (ID_NODE), VFIELD_NAME, \
1657 sizeof (VFIELD_NAME) - 1))
1658#define VFIELD_NAME_FORMAT "_vptr_%s"
1659#define VBASE_NAME "__vb_"
1660#define VBASE_NAME_P(ID_NODE) \
1661 (!strncmp (IDENTIFIER_POINTER (ID_NODE), VBASE_NAME, \
1662 sizeof (VBASE_NAME) - 1))
1663#define VBASE_NAME_FORMAT "__vb_%s"
1664#define STATIC_NAME_FORMAT "__static_%s_%s"
1665
1666#define ANON_AGGRNAME_PREFIX "__anon_"
1667#define ANON_AGGRNAME_P(ID_NODE) \
1668 (!strncmp (IDENTIFIER_POINTER (ID_NODE), ANON_AGGRNAME_PREFIX, \
1669 sizeof (ANON_AGGRNAME_PREFIX) - 1))
1670#define ANON_AGGRNAME_FORMAT "__anon_%d"
1671#define ANON_PARMNAME_FORMAT "__%d"
1672#define ANON_PARMNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == '_' \
1673 && IDENTIFIER_POINTER (ID_NODE)[1] == '_' \
1674 && IDENTIFIER_POINTER (ID_NODE)[2] <= '9')
1675
1676#endif /* NO_DOT_IN_LABEL */
1677#endif /* NO_DOLLAR_IN_LABEL */
1678
1679#define THIS_NAME "this"
1680#define DESTRUCTOR_NAME_FORMAT "~%s"
1681#define FILE_FUNCTION_PREFIX_LEN 9
fc378698
MS
1682#define CTOR_NAME "__ct"
1683#define DTOR_NAME "__dt"
8d08fdba
MS
1684
1685#define IN_CHARGE_NAME "__in_chrg"
1686
1687#define VTBL_PTR_TYPE "__vtbl_ptr_type"
1688#define VTABLE_DELTA_NAME "__delta"
1689#define VTABLE_INDEX_NAME "__index"
1690#define VTABLE_PFN_NAME "__pfn"
1691#define VTABLE_DELTA2_NAME "__delta2"
1692
1693#define SIGNATURE_FIELD_NAME "__s_"
1694#define SIGNATURE_FIELD_NAME_FORMAT "__s_%s"
1695#define SIGNATURE_OPTR_NAME "__optr"
1696#define SIGNATURE_SPTR_NAME "__sptr"
8d08fdba
MS
1697#define SIGNATURE_POINTER_NAME "__sp_"
1698#define SIGNATURE_POINTER_NAME_FORMAT "__%s%ssp_%s"
1699#define SIGNATURE_REFERENCE_NAME "__sr_"
1700#define SIGNATURE_REFERENCE_NAME_FORMAT "__%s%ssr_%s"
1701
1702#define SIGTABLE_PTR_TYPE "__sigtbl_ptr_type"
1703#define SIGTABLE_NAME_FORMAT "__st_%s_%s"
1704#define SIGTABLE_NAME_FORMAT_LONG "__st_%s_%s_%d"
46b49f6c 1705#define SIGTABLE_TAG_NAME "__tag"
4abea095
GB
1706#define SIGTABLE_VB_OFF_NAME "__vb_off"
1707#define SIGTABLE_VT_OFF_NAME "__vt_off"
8d08fdba
MS
1708#define EXCEPTION_CLEANUP_NAME "exception cleanup"
1709
1710#define THIS_NAME_P(ID_NODE) (strcmp(IDENTIFIER_POINTER (ID_NODE), "this") == 0)
1711
1712#if !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL)
1713
1714#define VPTR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \
1715 && IDENTIFIER_POINTER (ID_NODE)[1] == 'v')
1716#define DESTRUCTOR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == JOINER \
1717 && IDENTIFIER_POINTER (ID_NODE)[2] == '_')
1718
1719#define VTABLE_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == 'v' \
1720 && IDENTIFIER_POINTER (ID_NODE)[2] == 't' \
1721 && IDENTIFIER_POINTER (ID_NODE)[3] == JOINER)
1722
1723#define VBASE_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == 'v' \
1724 && IDENTIFIER_POINTER (ID_NODE)[2] == 'b' \
1725 && IDENTIFIER_POINTER (ID_NODE)[3] == JOINER)
1726
1727#define TEMP_NAME_P(ID_NODE) (!strncmp (IDENTIFIER_POINTER (ID_NODE), AUTO_TEMP_NAME, sizeof (AUTO_TEMP_NAME)-1))
1728#define VFIELD_NAME_P(ID_NODE) (!strncmp (IDENTIFIER_POINTER (ID_NODE), VFIELD_NAME, sizeof(VFIELD_NAME)-1))
1729
1730/* For anonymous aggregate types, we need some sort of name to
1731 hold on to. In practice, this should not appear, but it should
1732 not be harmful if it does. */
1733#define ANON_AGGRNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \
1734 && IDENTIFIER_POINTER (ID_NODE)[1] == '_')
1735#define ANON_PARMNAME_FORMAT "_%d"
1736#define ANON_PARMNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == '_' \
1737 && IDENTIFIER_POINTER (ID_NODE)[1] <= '9')
1738#endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */
1739\f
1740/* Define the sets of attributes that member functions and baseclasses
1741 can have. These are sensible combinations of {public,private,protected}
1742 cross {virtual,non-virtual}. */
1743
e92cc029 1744/* in class.c. */
be99da77
MS
1745extern tree access_default_node; /* 0 */
1746extern tree access_public_node; /* 1 */
1747extern tree access_protected_node; /* 2 */
1748extern tree access_private_node; /* 3 */
1749extern tree access_default_virtual_node; /* 4 */
1750extern tree access_public_virtual_node; /* 5 */
1751extern tree access_private_virtual_node; /* 6 */
8d08fdba 1752
8d08fdba
MS
1753/* Things for handling inline functions. */
1754
1755struct pending_inline
1756{
1757 struct pending_inline *next; /* pointer to next in chain */
1758 int lineno; /* line number we got the text from */
1759 char *filename; /* name of file we were processing */
1760 tree fndecl; /* FUNCTION_DECL that brought us here */
1761 int token; /* token we were scanning */
1762 int token_value; /* value of token we were scanning (YYSTYPE) */
1763
1764 char *buf; /* pointer to character stream */
1765 int len; /* length of stream */
8d08fdba
MS
1766 unsigned int can_free : 1; /* free this after we're done with it? */
1767 unsigned int deja_vu : 1; /* set iff we don't want to see it again. */
1768 unsigned int interface : 2; /* 0=interface 1=unknown 2=implementation */
1769};
1770
51c184be 1771/* in method.c */
8d08fdba
MS
1772extern struct pending_inline *pending_inlines;
1773
1774/* 1 for -fall-virtual: make every member function (except
1775 constructors) lay down in the virtual function table.
1776 Calls can then either go through the virtual function table or not,
1777 depending on whether we know what function will actually be called. */
1778
1779extern int flag_all_virtual;
1780
1781/* Positive values means that we cannot make optimizing assumptions about
1782 `this'. Negative values means we know `this' to be of static type. */
1783
1784extern int flag_this_is_variable;
1785
1786/* Controls whether enums and ints freely convert.
1787 1 means with complete freedom.
1788 0 means enums can convert to ints, but not vice-versa. */
1789
1790extern int flag_int_enum_equivalence;
1791
db5ae43f 1792/* Nonzero means generate 'rtti' that give run-time type information. */
8d08fdba 1793
db5ae43f 1794extern int flag_rtti;
8d08fdba 1795
a0a33927
MS
1796/* Nonzero means do emit exported implementations of functions even if
1797 they can be inlined. */
1798
1799extern int flag_implement_inlines;
1800
8d08fdba
MS
1801/* Nonzero means templates obey #pragma interface and implementation. */
1802
1803extern int flag_external_templates;
1804
1805/* Nonzero means templates are emitted where they are instantiated. */
1806
1807extern int flag_alt_external_templates;
1808
ddd5a7c1 1809/* Nonzero means implicit template instantiations are emitted. */
a0a33927
MS
1810
1811extern int flag_implicit_templates;
1812
72b7eeff
MS
1813/* Nonzero if we want to emit defined symbols with common-like linkage as
1814 weak symbols where possible, in order to conform to C++ semantics.
1815 Otherwise, emit them as local symbols. */
1816
1817extern int flag_weak;
1818
5566b478
MS
1819/* Nonzero if we're done parsing and into end-of-file activities. */
1820
1821extern int at_eof;
1822
8d08fdba
MS
1823enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
1824
8d08fdba
MS
1825/* The following two can be derived from the previous one */
1826extern tree current_class_name; /* IDENTIFIER_NODE: name of current class */
1827extern tree current_class_type; /* _TYPE: the type of the current class */
1828
1829/* Some macros for char-based bitfields. */
1830#define B_SET(a,x) (a[x>>3] |= (1 << (x&7)))
1831#define B_CLR(a,x) (a[x>>3] &= ~(1 << (x&7)))
1832#define B_TST(a,x) (a[x>>3] & (1 << (x&7)))
1833
1834/* These are uses as bits in flags passed to build_method_call
1835 to control its error reporting behavior.
1836
1837 LOOKUP_PROTECT means flag access violations.
1838 LOOKUP_COMPLAIN mean complain if no suitable member function
1839 matching the arguments is found.
1840 LOOKUP_NORMAL is just a combination of these two.
8d08fdba
MS
1841 LOOKUP_NONVIRTUAL means make a direct call to the member function found
1842 LOOKUP_GLOBAL means search through the space of overloaded functions,
1843 as well as the space of member functions.
1844 LOOKUP_HAS_IN_CHARGE means that the "in charge" variable is already
1845 in the parameter list.
6060a796 1846 LOOKUP_ONLYCONVERTING means that non-conversion constructors are not tried.
9a3b49ac
MS
1847 DIRECT_BIND means that if a temporary is created, it should be created so
1848 that it lives as long as the current variable bindings; otherwise it
1849 only lives until the end of the complete-expression.
878cd289
MS
1850 LOOKUP_SPECULATIVELY means return NULL_TREE if we cannot find what we are
1851 after. Note, LOOKUP_COMPLAIN is checked and error messages printed
1852 before LOOKUP_SPECULATIVELY is checked.
8d08fdba
MS
1853 LOOKUP_NO_CONVERSION means that user-defined conversions are not
1854 permitted. Built-in conversions are permitted.
c73964b2
MS
1855 LOOKUP_DESTRUCTOR means explicit call to destructor.
1856 LOOKUP_NO_TEMP_BIND means temporaries will not be bound to references. */
8d08fdba
MS
1857
1858#define LOOKUP_PROTECT (1)
1859#define LOOKUP_COMPLAIN (2)
1860#define LOOKUP_NORMAL (3)
4ac14744 1861/* #define LOOKUP_UNUSED (4) */
8d08fdba
MS
1862#define LOOKUP_NONVIRTUAL (8)
1863#define LOOKUP_GLOBAL (16)
1864#define LOOKUP_HAS_IN_CHARGE (32)
1865#define LOOKUP_SPECULATIVELY (64)
db5ae43f 1866#define LOOKUP_ONLYCONVERTING (128)
9a3b49ac 1867#define DIRECT_BIND (256)
8d08fdba
MS
1868#define LOOKUP_NO_CONVERSION (512)
1869#define LOOKUP_DESTRUCTOR (512)
c73964b2 1870#define LOOKUP_NO_TEMP_BIND (1024)
8d08fdba 1871
a4443a08
MS
1872/* These flags are used by the conversion code.
1873 CONV_IMPLICIT : Perform implicit conversions (standard and user-defined).
1874 CONV_STATIC : Perform the explicit conversions for static_cast.
1875 CONV_CONST : Perform the explicit conversions for const_cast.
1876 CONV_REINTERPRET: Perform the explicit conversions for reinterpret_cast.
6060a796 1877 CONV_PRIVATE : Perform upcasts to private bases.
8ccc31eb
MS
1878 CONV_FORCE_TEMP : Require a new temporary when converting to the same
1879 aggregate type. */
a4443a08
MS
1880
1881#define CONV_IMPLICIT 1
1882#define CONV_STATIC 2
1883#define CONV_CONST 4
1884#define CONV_REINTERPRET 8
1885#define CONV_PRIVATE 16
faf5394a 1886/* #define CONV_NONCONVERTING 32 */
8ccc31eb
MS
1887#define CONV_FORCE_TEMP 64
1888#define CONV_STATIC_CAST (CONV_IMPLICIT | CONV_STATIC | CONV_FORCE_TEMP)
a4443a08
MS
1889#define CONV_OLD_CONVERT (CONV_IMPLICIT | CONV_STATIC | CONV_CONST \
1890 | CONV_REINTERPRET)
1891#define CONV_C_CAST (CONV_IMPLICIT | CONV_STATIC | CONV_CONST \
8ccc31eb 1892 | CONV_REINTERPRET | CONV_PRIVATE | CONV_FORCE_TEMP)
a4443a08 1893
b7484fbe
MS
1894/* Used by build_expr_type_conversion to indicate which types are
1895 acceptable as arguments to the expression under consideration. */
1896
1897#define WANT_INT 1 /* integer types, including bool */
1898#define WANT_FLOAT 2 /* floating point types */
1899#define WANT_ENUM 4 /* enumerated types */
1900#define WANT_POINTER 8 /* pointer types */
1901#define WANT_NULL 16 /* null pointer constant */
1902
1903#define WANT_ARITH (WANT_INT | WANT_FLOAT)
1904
8d08fdba
MS
1905/* Anatomy of a DECL_FRIENDLIST (which is a TREE_LIST):
1906 purpose = friend name (IDENTIFIER_NODE);
1907 value = TREE_LIST of FUNCTION_DECLS;
1908 chain, type = EMPTY; */
1909#define FRIEND_NAME(LIST) (TREE_PURPOSE (LIST))
1910#define FRIEND_DECLS(LIST) (TREE_VALUE (LIST))
1911
1912/* These macros are for accessing the fields of TEMPLATE...PARM nodes. */
5566b478
MS
1913#define TEMPLATE_TYPE_IDX(NODE) TREE_INT_CST_LOW (TYPE_FIELDS (NODE))
1914#define TEMPLATE_TYPE_LEVEL(NODE) TREE_INT_CST_HIGH (TYPE_FIELDS (NODE))
1915#define TEMPLATE_TYPE_SET_INFO(NODE,I,L) \
1916 (TYPE_FIELDS (NODE) = build_int_2 (I, L))
1917#define TEMPLATE_CONST_IDX(NODE) (TREE_INT_CST_LOW(NODE))
1918#define TEMPLATE_CONST_LEVEL(NODE) (TREE_INT_CST_HIGH(NODE))
1919#define TEMPLATE_CONST_SET_INFO(NODE,I,L) \
1920 (TEMPLATE_CONST_IDX (NODE) = I, TEMPLATE_CONST_LEVEL (NODE) = L)
8d08fdba 1921
51c184be 1922/* in lex.c */
8d08fdba
MS
1923/* Indexed by TREE_CODE, these tables give C-looking names to
1924 operators represented by TREE_CODES. For example,
1925 opname_tab[(int) MINUS_EXPR] == "-". */
1926extern char **opname_tab, **assignop_tab;
1927\f
1928/* in c-common.c */
1929extern tree convert_and_check PROTO((tree, tree));
1930extern void overflow_warning PROTO((tree));
1931extern void unsigned_conversion_warning PROTO((tree, tree));
1932
51c184be 1933/* in call.c */
faf5394a 1934extern struct candidate *ansi_c_filler;
8d08fdba
MS
1935
1936extern int rank_for_overload PROTO((struct candidate *, struct candidate *));
5566b478
MS
1937extern int can_convert PROTO((tree, tree));
1938extern int can_convert_arg PROTO((tree, tree, tree));
8d08fdba
MS
1939extern void compute_conversion_costs PROTO((tree, tree, struct candidate *, int));
1940extern int get_arglist_len_in_bytes PROTO((tree));
1941extern tree build_vfield_ref PROTO((tree, tree));
1942extern tree find_scoped_type PROTO((tree, tree, tree));
1943extern tree resolve_scope_to_name PROTO((tree, tree));
4ac14744
MS
1944extern tree build_call PROTO((tree, tree, tree));
1945extern tree build_addr_func PROTO((tree));
8d08fdba
MS
1946extern tree build_scoped_method_call PROTO((tree, tree, tree, tree));
1947extern tree build_method_call PROTO((tree, tree, tree, tree, int));
1948extern tree build_overload_call_real PROTO((tree, tree, int, struct candidate *, int));
ce122a86 1949extern tree build_overload_call PROTO((tree, tree, int));
c73964b2 1950extern tree build_new_method_call PROTO((tree, tree, tree, tree, int));
faf5394a 1951extern tree build_user_type_conversion PROTO((tree, tree, int));
c73964b2
MS
1952extern tree build_new_function_call PROTO((tree, tree, tree));
1953extern tree build_new_op PROTO((enum tree_code, int, tree, tree, tree));
f7da6097 1954extern tree type_decays_to PROTO((tree));
8d08fdba 1955
51c184be 1956/* in class.c */
8d08fdba
MS
1957extern tree build_vbase_pointer PROTO((tree, tree));
1958extern tree build_vbase_path PROTO((enum tree_code, tree, tree, tree, int));
1959extern tree build_vtable_entry PROTO((tree, tree));
6b5fbb55 1960extern tree build_vtbl_ref PROTO((tree, tree));
8d08fdba
MS
1961extern tree build_vfn_ref PROTO((tree *, tree, tree));
1962extern void add_method PROTO((tree, tree *, tree));
51c184be 1963extern tree get_vfield_offset PROTO((tree));
8d08fdba 1964extern void duplicate_tag_error PROTO((tree));
2ee887f2 1965extern tree finish_struct PROTO((tree, tree, tree, int));
6467930b 1966extern tree finish_struct_1 PROTO((tree, int));
5566b478 1967extern tree finish_struct_methods PROTO((tree, tree, int));
8d08fdba
MS
1968extern int resolves_to_fixed_type_p PROTO((tree, int *));
1969extern void init_class_processing PROTO((void));
1970extern void pushclass PROTO((tree, int));
1971extern void popclass PROTO((int));
1972extern void push_nested_class PROTO((tree, int));
1973extern void pop_nested_class PROTO((int));
1974extern void push_lang_context PROTO((tree));
1975extern void pop_lang_context PROTO((void));
1976extern int root_lang_context_p PROTO((void));
1977extern tree instantiate_type PROTO((tree, tree, int));
1978extern void print_class_statistics PROTO((void));
1979extern void maybe_push_cache_obstack PROTO((void));
f30432d7 1980extern unsigned HOST_WIDE_INT skip_rtti_stuff PROTO((tree *));
c91a56d2 1981extern tree build_self_reference PROTO((void));
8d08fdba 1982
51c184be 1983/* in cvt.c */
a4443a08 1984extern tree convert_to_reference PROTO((tree, tree, int, int, tree));
8d08fdba
MS
1985extern tree convert_from_reference PROTO((tree));
1986extern tree convert_to_aggr PROTO((tree, tree, char **, int));
1987extern tree convert_pointer_to PROTO((tree, tree));
1988extern tree convert_pointer_to_real PROTO((tree, tree));
1989extern tree convert_pointer_to_vbase PROTO((tree, tree));
1990extern tree convert PROTO((tree, tree));
6060a796
MS
1991extern tree cp_convert PROTO((tree, tree, int, int));
1992extern tree convert_force PROTO((tree, tree, int));
8d08fdba 1993extern tree build_type_conversion PROTO((enum tree_code, tree, tree, int));
b7484fbe 1994extern tree build_expr_type_conversion PROTO((int, tree, int));
8d08fdba 1995extern int build_default_binary_type_conversion PROTO((enum tree_code, tree *, tree *));
39211cd5 1996extern tree type_promotes_to PROTO((tree));
8d08fdba 1997
51c184be 1998/* decl.c */
8d08fdba 1999extern int global_bindings_p PROTO((void));
a9aedbc2 2000extern int toplevel_bindings_p PROTO((void));
8d08fdba
MS
2001extern void keep_next_level PROTO((void));
2002extern int kept_level_p PROTO((void));
2003extern void declare_parm_level PROTO((void));
2004extern void declare_implicit_exception PROTO((void));
2005extern int have_exceptions_p PROTO((void));
8d08fdba
MS
2006extern void declare_pseudo_global_level PROTO((void));
2007extern int pseudo_global_level_p PROTO((void));
2008extern void pushlevel PROTO((int));
2009extern void pushlevel_temporary PROTO((int));
2010extern tree poplevel PROTO((int, int, int));
2011extern void delete_block PROTO((tree));
2012extern void insert_block PROTO((tree));
2013extern void add_block_current_level PROTO((tree));
2014extern void set_block PROTO((tree));
2015extern void pushlevel_class PROTO((void));
700f8a87 2016extern tree poplevel_class PROTO((int));
8d08fdba
MS
2017/* skip print_other_binding_stack and print_binding_level */
2018extern void print_binding_stack PROTO((void));
2019extern void push_to_top_level PROTO((void));
2020extern void pop_from_top_level PROTO((void));
2021extern void set_identifier_type_value PROTO((tree, tree));
8926095f 2022extern void pop_everything PROTO((void));
8d08fdba
MS
2023extern tree make_type_decl PROTO((tree, tree));
2024extern void pushtag PROTO((tree, tree, int));
2025extern tree make_anon_name PROTO((void));
2026extern void clear_anon_tags PROTO((void));
2027extern tree pushdecl PROTO((tree));
2028extern tree pushdecl_top_level PROTO((tree));
2029extern void push_class_level_binding PROTO((tree, tree));
2030extern void push_overloaded_decl_top_level PROTO((tree, int));
2031extern tree pushdecl_class_level PROTO((tree));
5566b478 2032extern void pushdecl_nonclass_level PROTO((tree));
8d08fdba
MS
2033extern int overloaded_globals_p PROTO((tree));
2034extern tree push_overloaded_decl PROTO((tree, int));
2035extern tree implicitly_declare PROTO((tree));
2036extern tree lookup_label PROTO((tree));
2037extern tree shadow_label PROTO((tree));
2038extern tree define_label PROTO((char *, int, tree));
2039extern void define_case_label PROTO((tree));
2040extern tree getdecls PROTO((void));
2041extern tree gettags PROTO((void));
2042extern void set_current_level_tags_transparency PROTO((int));
2043extern tree typedecl_for_tag PROTO((tree));
2044extern tree lookup_name PROTO((tree, int));
a9aedbc2 2045extern tree lookup_namespace_name PROTO((tree, tree));
8d08fdba
MS
2046extern tree lookup_name_current_level PROTO((tree));
2047extern void init_decl_processing PROTO((void));
5566b478 2048extern int init_type_desc PROTO((void));
8d08fdba
MS
2049/* skipped define_function */
2050extern void shadow_tag PROTO((tree));
a0a33927 2051extern int grok_ctor_properties PROTO((tree, tree));
8d08fdba 2052extern tree groktypename PROTO((tree));
c11b6f21 2053extern tree start_decl PROTO((tree, tree, int));
b3417a04 2054extern void cp_finish_decl PROTO((tree, tree, tree, int, int));
8d08fdba
MS
2055extern void expand_static_init PROTO((tree, tree));
2056extern int complete_array_type PROTO((tree, tree, int));
2057extern tree build_ptrmemfunc_type PROTO((tree));
f30432d7 2058/* the grokdeclarator prototype is in decl.h */
8926095f 2059extern int parmlist_is_exprlist PROTO((tree));
8d08fdba 2060extern tree xref_tag PROTO((tree, tree, tree, int));
fc378698 2061extern tree xref_tag_from_type PROTO((tree, tree, int));
8ccc31eb 2062extern void xref_basetypes PROTO((tree, tree, tree, tree));
8d08fdba
MS
2063extern tree start_enum PROTO((tree));
2064extern tree finish_enum PROTO((tree, tree));
2065extern tree build_enumerator PROTO((tree, tree));
2066extern tree grok_enum_decls PROTO((tree, tree));
c11b6f21 2067extern int start_function PROTO((tree, tree, tree, int));
8d08fdba 2068extern void store_parm_decls PROTO((void));
f30432d7
MS
2069extern void expand_start_early_try_stmts PROTO((void));
2070extern void store_in_parms PROTO((struct rtx_def *));
8d08fdba 2071extern void store_return_init PROTO((tree, tree));
db5ae43f 2072extern void finish_function PROTO((int, int, int));
c11b6f21 2073extern tree start_method PROTO((tree, tree));
8d08fdba
MS
2074extern tree finish_method PROTO((tree));
2075extern void hack_incomplete_structures PROTO((tree));
2076extern tree maybe_build_cleanup PROTO((tree));
c73964b2 2077extern tree maybe_build_cleanup_and_delete PROTO((tree));
8d08fdba
MS
2078extern void cplus_expand_expr_stmt PROTO((tree));
2079extern void finish_stmt PROTO((void));
2080extern void pop_implicit_try_blocks PROTO((tree));
2081extern void push_exception_cleanup PROTO((tree));
2082extern void revert_static_member_fn PROTO((tree *, tree *, tree *));
5566b478
MS
2083extern int id_in_current_class PROTO((tree));
2084extern void push_cp_function_context PROTO((tree));
2085extern void pop_cp_function_context PROTO((tree));
2086extern void grok_op_properties PROTO((tree, int, int));
8d08fdba 2087
51c184be 2088/* in decl2.c */
6b5fbb55
MS
2089extern int flag_assume_nonnull_objects;
2090
8d08fdba
MS
2091extern int lang_decode_option PROTO((char *));
2092extern tree grok_method_quals PROTO((tree, tree, tree));
2093extern void grokclassfn PROTO((tree, tree, tree, enum overload_flags, tree));
2094extern tree grok_alignof PROTO((tree));
2095extern tree grok_array_decl PROTO((tree, tree));
2096extern tree delete_sanity PROTO((tree, tree, int, int));
5566b478 2097extern tree check_classfn PROTO((tree, tree));
c11b6f21 2098extern tree grokfield PROTO((tree, tree, tree, tree, tree));
8d08fdba
MS
2099extern tree grokbitfield PROTO((tree, tree, tree));
2100extern tree groktypefield PROTO((tree, tree));
51c184be 2101extern tree grokoptypename PROTO((tree, tree));
5566b478 2102extern int copy_assignment_arg_p PROTO((tree, int));
f6abb50a 2103extern void cplus_decl_attributes PROTO((tree, tree, tree));
8d08fdba
MS
2104extern tree constructor_name_full PROTO((tree));
2105extern tree constructor_name PROTO((tree));
2106extern void setup_vtbl_ptr PROTO((void));
2107extern void mark_inline_for_output PROTO((tree));
2108extern void clear_temp_name PROTO((void));
2109extern tree get_temp_name PROTO((tree, int));
2110extern tree get_temp_regvar PROTO((tree, tree));
2111extern void finish_anon_union PROTO((tree));
2112extern tree finish_table PROTO((tree, tree, tree, int));
2113extern void finish_builtin_type PROTO((tree, char *, tree *, int, tree));
2114extern tree coerce_new_type PROTO((tree));
2115extern tree coerce_delete_type PROTO((tree));
5566b478 2116extern void import_export_vtable PROTO((tree, tree, int));
c73964b2 2117extern int finish_prevtable_vardecl PROTO((tree, tree));
fc378698 2118extern int walk_vtables PROTO((void (*)(), int (*)()));
311862c8 2119extern void walk_sigtables PROTO((void (*)(), void (*)()));
8d08fdba 2120extern void finish_file PROTO((void));
8ccc31eb 2121extern void warn_if_unknown_interface PROTO((tree));
8d08fdba 2122extern tree grok_x_components PROTO((tree, tree));
51c184be
MS
2123extern tree reparse_absdcl_as_expr PROTO((tree, tree));
2124extern tree reparse_absdcl_as_casts PROTO((tree, tree));
5566b478 2125extern tree build_expr_from_tree PROTO((tree));
51c184be
MS
2126extern tree reparse_decl_as_expr PROTO((tree, tree));
2127extern tree finish_decl_parsing PROTO((tree));
700f8a87 2128extern tree lookup_name_nonclass PROTO((tree));
2986ae00 2129extern tree check_cp_case_value PROTO((tree));
6b5fbb55 2130extern void do_toplevel_using_decl PROTO((tree));
a9aedbc2 2131extern tree do_class_using_decl PROTO((tree));
6060a796
MS
2132extern tree current_namespace_id PROTO((tree));
2133extern tree get_namespace_id PROTO((void));
f30432d7 2134extern void check_default_args PROTO((tree));
5566b478 2135extern void mark_used PROTO((tree));
8d08fdba 2136
51c184be 2137/* in except.c */
8d2733ca 2138extern void expand_exception_blocks PROTO((void));
8d2733ca
MS
2139extern void start_catch_block PROTO((tree, tree));
2140extern void end_catch_block PROTO((void));
2141extern void expand_throw PROTO((tree));
8d2733ca 2142extern tree build_throw PROTO((tree));
8d08fdba 2143extern void init_exception_processing PROTO((void));
f30432d7
MS
2144extern void expand_builtin_throw PROTO((void));
2145extern void expand_start_eh_spec PROTO((void));
72b7eeff
MS
2146extern tree build_cleanup PROTO((tree));
2147extern tree start_anon_func PROTO((void));
8d08fdba 2148
51c184be 2149/* in expr.c */
8d08fdba
MS
2150/* skip cplus_expand_expr */
2151extern void init_cplus_expand PROTO((void));
2152extern void fixup_result_decl PROTO((tree, struct rtx_def *));
8d08fdba 2153
5566b478
MS
2154/* in repo.c */
2155extern void init_repo PROTO((char*));
2156extern void finish_repo PROTO((void));
2157
9e9ff709 2158/* in rtti.c */
6b5fbb55 2159extern tree get_tinfo_fn PROTO((tree));
5156628f 2160extern tree get_tinfo_fn_dynamic PROTO((tree));
8d08fdba 2161extern tree build_typeid PROTO((tree));
5156628f 2162extern tree build_x_typeid PROTO((tree));
8d08fdba
MS
2163extern tree get_typeid PROTO((tree));
2164extern tree build_dynamic_cast PROTO((tree, tree));
2165
51c184be 2166/* in init.c */
8d08fdba
MS
2167extern void emit_base_init PROTO((tree, int));
2168extern void check_base_init PROTO((tree));
7177d104 2169extern void expand_direct_vtbls_init PROTO((tree, tree, int, int, tree));
8d08fdba
MS
2170extern void do_member_init PROTO((tree, tree, tree));
2171extern void expand_member_init PROTO((tree, tree, tree));
6060a796 2172extern void expand_aggr_init PROTO((tree, tree, int, int));
8d08fdba 2173extern int is_aggr_typedef PROTO((tree, int));
5566b478 2174extern int is_aggr_type PROTO((tree, int));
8d08fdba
MS
2175extern tree get_aggr_from_typedef PROTO((tree, int));
2176extern tree get_type_value PROTO((tree));
2177extern tree build_member_call PROTO((tree, tree, tree));
2178extern tree build_offset_ref PROTO((tree, tree));
b7484fbe 2179extern tree get_member_function_from_ptrfunc PROTO((tree *, tree));
8d08fdba
MS
2180extern tree resolve_offset_ref PROTO((tree));
2181extern tree decl_constant_value PROTO((tree));
2182extern int is_friend_type PROTO((tree, tree));
2183extern int is_friend PROTO((tree, tree));
2184extern void make_friend_class PROTO((tree, tree));
5566b478 2185extern tree do_friend PROTO((tree, tree, tree, tree, enum overload_flags, tree, int));
8d08fdba
MS
2186extern void embrace_waiting_friends PROTO((tree));
2187extern tree build_builtin_call PROTO((tree, tree, tree));
2188extern tree build_new PROTO((tree, tree, tree, int));
2189extern tree expand_vec_init PROTO((tree, tree, tree, tree, int));
2190extern tree build_x_delete PROTO((tree, tree, int, tree));
2191extern tree build_delete PROTO((tree, tree, tree, int, int));
2192extern tree build_vbase_delete PROTO((tree, tree));
5566b478 2193extern tree build_vec_delete PROTO((tree, tree, tree, tree, int));
8d08fdba 2194
51c184be 2195/* in input.c */
8d08fdba 2196
51c184be 2197/* in lex.c */
8d08fdba
MS
2198extern tree make_pointer_declarator PROTO((tree, tree));
2199extern tree make_reference_declarator PROTO((tree, tree));
c11b6f21
MS
2200extern tree make_call_declarator PROTO((tree, tree, tree, tree));
2201extern void set_quals_and_spec PROTO((tree, tree, tree));
8d08fdba
MS
2202extern char *operator_name_string PROTO((tree));
2203extern void lang_init PROTO((void));
2204extern void lang_finish PROTO((void));
2205extern void init_filename_times PROTO((void));
2206extern void reinit_lang_specific PROTO((void));
2207extern void init_lex PROTO((void));
2208extern void reinit_parse_for_function PROTO((void));
2209extern int *init_parse PROTO((void));
2210extern void print_parse_statistics PROTO((void));
2211extern void extract_interface_info PROTO((void));
fc378698 2212extern int set_vardecl_interface_info PROTO((tree, tree));
8d08fdba
MS
2213extern void do_pending_inlines PROTO((void));
2214extern void process_next_inline PROTO((tree));
2215/* skip restore_pending_input */
2216extern void yyungetc PROTO((int, int));
2217extern void reinit_parse_for_method PROTO((int, tree));
2218#if 0
2219extern void reinit_parse_for_block PROTO((int, struct obstack *, int));
2220#endif
f376e137 2221extern tree cons_up_default_function PROTO((tree, tree, int));
8d08fdba
MS
2222extern void check_for_missing_semicolon PROTO((tree));
2223extern void note_got_semicolon PROTO((tree));
2224extern void note_list_got_semicolon PROTO((tree));
2225extern int check_newline PROTO((void));
2226extern void dont_see_typename PROTO((void));
2227extern int identifier_type PROTO((tree));
2228extern void see_typename PROTO((void));
5566b478
MS
2229extern tree do_identifier PROTO((tree, int));
2230extern tree do_scoped_id PROTO((tree, int));
8d08fdba
MS
2231extern tree identifier_typedecl_value PROTO((tree));
2232extern int real_yylex PROTO((void));
2233extern tree build_lang_decl PROTO((enum tree_code, tree, tree));
2234extern tree build_lang_field_decl PROTO((enum tree_code, tree, tree));
2235extern void copy_lang_decl PROTO((tree));
2236extern tree make_lang_type PROTO((enum tree_code));
2237extern void copy_decl_lang_specific PROTO((tree));
2238extern void dump_time_statistics PROTO((void));
2239/* extern void compiler_error PROTO((char *, HOST_WIDE_INT, HOST_WIDE_INT)); */
8d08fdba
MS
2240extern void yyerror PROTO((char *));
2241
8926095f
MS
2242/* in errfn.c */
2243extern void cp_error ();
2244extern void cp_error_at ();
2245extern void cp_warning ();
2246extern void cp_warning_at ();
2247extern void cp_pedwarn ();
2248extern void cp_pedwarn_at ();
2249extern void cp_compiler_error ();
2250extern void cp_sprintf ();
2251
51c184be 2252/* in error.c */
8d08fdba 2253extern void init_error PROTO((void));
5566b478 2254extern char *fndecl_as_string PROTO((tree, int));
8d08fdba
MS
2255extern char *type_as_string PROTO((tree, int));
2256extern char *args_as_string PROTO((tree, int));
2257extern char *decl_as_string PROTO((tree, int));
2258extern char *expr_as_string PROTO((tree, int));
2259extern char *code_as_string PROTO((enum tree_code, int));
2260extern char *language_as_string PROTO((enum languages, int));
2261extern char *parm_as_string PROTO((int, int));
2262extern char *op_as_string PROTO((enum tree_code, int));
c91a56d2 2263extern char *assop_as_string PROTO((enum tree_code, int));
f30432d7 2264extern char *cv_as_string PROTO((tree, int));
8d08fdba 2265
51c184be 2266/* in method.c */
8d08fdba
MS
2267extern void init_method PROTO((void));
2268extern tree make_anon_parm_name PROTO((void));
2269extern void clear_anon_parm_name PROTO((void));
2270extern void do_inline_function_hair PROTO((tree, tree));
2271/* skip report_type_mismatch */
2272extern char *build_overload_name PROTO((tree, int, int));
f376e137 2273extern tree build_static_name PROTO((tree, tree));
8d08fdba
MS
2274extern tree cplus_exception_name PROTO((tree));
2275extern tree build_decl_overload PROTO((tree, tree, int));
2276extern tree build_typename_overload PROTO((tree));
6b5fbb55 2277extern tree build_overload_with_type PROTO((tree, tree));
8d08fdba 2278extern tree build_opfncall PROTO((enum tree_code, int, tree, tree, tree));
5566b478 2279extern tree hack_identifier PROTO((tree, tree));
8d08fdba 2280extern tree build_component_type_expr PROTO((tree, tree, tree, int));
6b5fbb55 2281extern tree make_thunk PROTO((tree, int));
5566b478 2282extern void synthesize_method PROTO((tree));
8d08fdba 2283
51c184be 2284/* in pt.c */
46b49f6c 2285extern tree tsubst PROTO ((tree, tree*, int, tree));
5566b478
MS
2286extern tree tsubst_expr PROTO ((tree, tree*, int, tree));
2287extern tree tsubst_copy PROTO ((tree, tree*, int, tree));
2288extern tree tsubst_chain PROTO((tree, tree));
8d08fdba
MS
2289extern void begin_template_parm_list PROTO((void));
2290extern tree process_template_parm PROTO((tree, tree));
2291extern tree end_template_parm_list PROTO((tree));
5566b478 2292extern void end_template_decl PROTO((void));
9a3b49ac 2293extern tree current_template_args PROTO((void));
6b5fbb55 2294extern void push_template_decl PROTO((tree));
8d08fdba 2295extern tree lookup_template_class PROTO((tree, tree, tree));
8d08fdba 2296extern int uses_template_parms PROTO((tree));
5566b478 2297extern tree instantiate_class_template PROTO((tree));
8d08fdba 2298extern tree instantiate_template PROTO((tree, tree *));
6b5fbb55 2299extern void overload_template_name PROTO((tree));
6467930b 2300extern int type_unification PROTO((tree, tree *, tree, tree, int *, int, int));
8d08fdba 2301struct tinst_level *tinst_for_decl PROTO((void));
5566b478
MS
2302extern void mark_decl_instantiated PROTO((tree, int));
2303extern void mark_class_instantiated PROTO((tree, int));
f0e01782
MS
2304extern void do_function_instantiation PROTO((tree, tree, tree));
2305extern void do_type_instantiation PROTO((tree, tree));
5566b478
MS
2306extern tree make_typename_type PROTO((tree, tree));
2307extern tree instantiate_decl PROTO((tree));
2308extern tree classtype_mangled_name PROTO((tree));
2309extern tree lookup_nested_type_by_name PROTO((tree, tree));
2310extern tree do_poplevel PROTO((void));
73aad9b9 2311extern tree *get_bindings PROTO((tree, tree));
8d08fdba 2312
51c184be 2313/* in search.c */
8d08fdba
MS
2314extern void push_memoized_context PROTO((tree, int));
2315extern void pop_memoized_context PROTO((int));
2316extern tree get_binfo PROTO((tree, tree, int));
2317extern int get_base_distance PROTO((tree, tree, int, tree *));
be99da77 2318extern tree compute_access PROTO((tree, tree));
8d08fdba
MS
2319extern tree lookup_field PROTO((tree, tree, int, int));
2320extern tree lookup_nested_field PROTO((tree, int));
2321extern tree lookup_fnfields PROTO((tree, tree, int));
a28e3c7f 2322extern tree lookup_nested_tag PROTO((tree, tree));
7177d104 2323extern tree get_matching_virtual PROTO((tree, tree, int));
8d08fdba
MS
2324extern tree get_abstract_virtuals PROTO((tree));
2325extern tree get_baselinks PROTO((tree, tree, tree));
2326extern tree next_baselink PROTO((tree));
2327extern tree init_vbase_pointers PROTO((tree, tree));
9e9ff709 2328extern void expand_indirect_vtbls_init PROTO((tree, tree, tree));
8d08fdba
MS
2329extern void clear_search_slots PROTO((tree));
2330extern tree get_vbase_types PROTO((tree));
2331extern void build_mi_matrix PROTO((tree));
2332extern void free_mi_matrix PROTO((void));
2333extern void build_mi_virtuals PROTO((int, int));
2334extern void add_mi_virtuals PROTO((int, tree));
2335extern void report_ambiguous_mi_virtuals PROTO((int, tree));
2336extern void note_debug_info_needed PROTO((tree));
45537677 2337extern void push_class_decls PROTO((tree));
5566b478 2338extern void pop_class_decls PROTO(());
8d08fdba
MS
2339extern void unuse_fields PROTO((tree));
2340extern void unmark_finished_struct PROTO((tree));
2341extern void print_search_statistics PROTO((void));
2342extern void init_search_processing PROTO((void));
2343extern void reinit_search_statistics PROTO((void));
2344extern tree current_scope PROTO((void));
e1cd6e56 2345extern tree lookup_conversions PROTO((tree));
c73964b2 2346extern tree get_template_base PROTO((tree, tree));
8d08fdba 2347
51c184be 2348/* in sig.c */
8d08fdba
MS
2349extern tree build_signature_pointer_type PROTO((tree, int, int));
2350extern tree build_signature_reference_type PROTO((tree, int, int));
2351extern tree build_signature_pointer_constructor PROTO((tree, tree));
c11b6f21 2352extern tree build_signature_method_call PROTO((tree, tree));
8d08fdba
MS
2353extern tree build_optr_ref PROTO((tree));
2354extern tree build_sptr_ref PROTO((tree));
5566b478 2355extern void append_signature_fields PROTO((tree));
8d08fdba 2356
51c184be 2357/* in spew.c */
8d08fdba 2358extern void init_spew PROTO((void));
5566b478 2359extern int peek_yylex PROTO((void));
8d08fdba
MS
2360extern int yylex PROTO((void));
2361extern tree arbitrate_lookup PROTO((tree, tree, tree));
2362
51c184be 2363/* in tree.c */
5566b478
MS
2364extern int real_lvalue_p PROTO((tree));
2365extern tree build_min PVPROTO((enum tree_code, tree, ...));
2366extern tree build_min_nt PVPROTO((enum tree_code, ...));
2367extern tree min_tree_cons PROTO((tree, tree, tree));
8d08fdba
MS
2368extern int lvalue_p PROTO((tree));
2369extern int lvalue_or_else PROTO((tree, char *));
5566b478 2370extern tree build_cplus_new PROTO((tree, tree));
8d08fdba
MS
2371extern tree break_out_cleanups PROTO((tree));
2372extern tree break_out_calls PROTO((tree));
2373extern tree build_cplus_method_type PROTO((tree, tree, tree));
2374extern tree build_cplus_staticfn_type PROTO((tree, tree, tree));
2375extern tree build_cplus_array_type PROTO((tree, tree));
2376extern void propagate_binfo_offsets PROTO((tree, tree));
2377extern int layout_vbasetypes PROTO((tree, int));
2378extern tree layout_basetypes PROTO((tree, tree));
2379extern int list_hash PROTO((tree));
2380extern tree list_hash_lookup PROTO((int, tree));
2381extern void list_hash_add PROTO((int, tree));
2382extern tree list_hash_canon PROTO((int, tree));
2383extern tree hash_tree_cons PROTO((int, int, int, tree, tree, tree));
2384extern tree hash_tree_chain PROTO((tree, tree));
2385extern tree hash_chainon PROTO((tree, tree));
2386extern tree get_decl_list PROTO((tree));
8d08fdba 2387extern tree make_binfo PROTO((tree, tree, tree, tree, tree));
8d08fdba
MS
2388extern tree binfo_value PROTO((tree, tree));
2389extern tree reverse_path PROTO((tree));
8d08fdba
MS
2390extern void debug_binfo PROTO((tree));
2391extern int decl_list_length PROTO((tree));
8926095f 2392extern int count_functions PROTO((tree));
8d08fdba
MS
2393extern int is_overloaded_fn PROTO((tree));
2394extern tree get_first_fn PROTO((tree));
2395extern tree fnaddr_from_vtable_entry PROTO((tree));
8d08fdba
MS
2396extern tree function_arg_chain PROTO((tree));
2397extern int promotes_to_aggr_type PROTO((tree, enum tree_code));
2398extern int is_aggr_type_2 PROTO((tree, tree));
2399extern void message_2_types PROTO((void (*)(), char *, tree, tree));
2400extern char *lang_printable_name PROTO((tree));
f30432d7 2401extern tree build_exception_variant PROTO((tree, tree));
8d08fdba
MS
2402extern tree copy_to_permanent PROTO((tree));
2403extern void print_lang_statistics PROTO((void));
2404/* skip __eprintf */
2405extern tree array_type_nelts_total PROTO((tree));
2406extern tree array_type_nelts_top PROTO((tree));
878cd289 2407extern tree break_out_target_exprs PROTO((tree));
5566b478 2408extern tree get_type_decl PROTO((tree));
6b5fbb55 2409extern tree vec_binfo_member PROTO((tree, tree));
e76a2646 2410extern tree hack_decl_function_context PROTO((tree));
d11ad92e
MS
2411extern tree lvalue_type PROTO((tree));
2412extern tree error_type PROTO((tree));
8d08fdba 2413
51c184be 2414/* in typeck.c */
8ccc31eb 2415extern tree condition_conversion PROTO((tree));
8d08fdba
MS
2416extern tree target_type PROTO((tree));
2417extern tree require_complete_type PROTO((tree));
5566b478 2418extern tree complete_type PROTO((tree));
8d08fdba
MS
2419extern int type_unknown_p PROTO((tree));
2420extern int fntype_p PROTO((tree));
2421extern tree require_instantiated_type PROTO((tree, tree, tree));
2422extern tree commonparms PROTO((tree, tree));
2423extern tree common_type PROTO((tree, tree));
5566b478 2424extern int compexcepttypes PROTO((tree, tree));
8d08fdba
MS
2425extern int comptypes PROTO((tree, tree, int));
2426extern int comp_target_types PROTO((tree, tree, int));
2427extern tree common_base_types PROTO((tree, tree));
2428extern int compparms PROTO((tree, tree, int));
2429extern int comp_target_types PROTO((tree, tree, int));
a28e3c7f 2430extern int self_promoting_args_p PROTO((tree));
8d08fdba
MS
2431extern tree unsigned_type PROTO((tree));
2432extern tree signed_type PROTO((tree));
2433extern tree signed_or_unsigned_type PROTO((int, tree));
5566b478 2434extern tree expr_sizeof PROTO((tree));
8d08fdba
MS
2435extern tree c_sizeof PROTO((tree));
2436extern tree c_sizeof_nowarn PROTO((tree));
2437extern tree c_alignof PROTO((tree));
6b5fbb55 2438extern tree inline_conversion PROTO((tree));
f30432d7 2439extern tree decay_conversion PROTO((tree));
8d08fdba
MS
2440extern tree default_conversion PROTO((tree));
2441extern tree build_object_ref PROTO((tree, tree, tree));
2442extern tree build_component_ref_1 PROTO((tree, tree, int));
2443extern tree build_component_ref PROTO((tree, tree, tree, int));
5156628f 2444extern tree build_x_component_ref PROTO((tree, tree, tree, int));
8d08fdba
MS
2445extern tree build_x_indirect_ref PROTO((tree, char *));
2446extern tree build_indirect_ref PROTO((tree, char *));
2447extern tree build_x_array_ref PROTO((tree, tree));
2448extern tree build_array_ref PROTO((tree, tree));
2449extern tree build_x_function_call PROTO((tree, tree, tree));
2450extern tree build_function_call_real PROTO((tree, tree, int, int));
2451extern tree build_function_call PROTO((tree, tree));
2452extern tree build_function_call_maybe PROTO((tree, tree));
2453extern tree convert_arguments PROTO((tree, tree, tree, tree, int));
2454extern tree build_x_binary_op PROTO((enum tree_code, tree, tree));
2455extern tree build_binary_op PROTO((enum tree_code, tree, tree, int));
2456extern tree build_binary_op_nodefault PROTO((enum tree_code, tree, tree, enum tree_code));
2457extern tree build_component_addr PROTO((tree, tree, char *));
2458extern tree build_x_unary_op PROTO((enum tree_code, tree));
2459extern tree build_unary_op PROTO((enum tree_code, tree, int));
2460extern tree unary_complex_lvalue PROTO((enum tree_code, tree));
2461extern int mark_addressable PROTO((tree));
2462extern tree build_x_conditional_expr PROTO((tree, tree, tree));
2463extern tree build_conditional_expr PROTO((tree, tree, tree));
2464extern tree build_x_compound_expr PROTO((tree));
2465extern tree build_compound_expr PROTO((tree));
2986ae00
MS
2466extern tree build_static_cast PROTO((tree, tree));
2467extern tree build_reinterpret_cast PROTO((tree, tree));
2468extern tree build_const_cast PROTO((tree, tree));
faf5394a 2469extern tree build_c_cast PROTO((tree, tree));
5566b478 2470extern tree build_x_modify_expr PROTO((tree, enum tree_code, tree));
8d08fdba
MS
2471extern tree build_modify_expr PROTO((tree, enum tree_code, tree));
2472extern int language_lvalue_valid PROTO((tree));
2473extern void warn_for_assignment PROTO((char *, char *, char *, tree, int, int));
2474extern tree convert_for_initialization PROTO((tree, tree, tree, int, char *, tree, int));
2475extern void c_expand_asm_operands PROTO((tree, tree, tree, tree, int, char *, int));
2476extern void c_expand_return PROTO((tree));
2477extern tree c_expand_start_case PROTO((tree));
d2e5ee5c 2478extern int ptr_reasonably_similar PROTO((tree, tree));
8d08fdba
MS
2479extern tree build_component_ref PROTO((tree, tree, tree, int));
2480extern tree build_ptrmemfunc PROTO((tree, tree, int));
2481
51c184be 2482/* in typeck2.c */
8d08fdba
MS
2483extern tree error_not_base_type PROTO((tree, tree));
2484extern tree binfo_or_else PROTO((tree, tree));
8d08fdba
MS
2485extern void readonly_error PROTO((tree, char *, int));
2486extern void abstract_virtuals_error PROTO((tree, tree));
5566b478 2487extern void signature_error PROTO((tree, tree));
8d08fdba
MS
2488extern void incomplete_type_error PROTO((tree, tree));
2489extern void my_friendly_abort PROTO((int));
2490extern void my_friendly_assert PROTO((int, int));
2491extern tree store_init_value PROTO((tree, tree));
2492extern tree digest_init PROTO((tree, tree, tree *));
2493extern tree build_scoped_ref PROTO((tree, tree));
2494extern tree build_x_arrow PROTO((tree));
2495extern tree build_m_component_ref PROTO((tree, tree));
2496extern tree build_functional_cast PROTO((tree, tree));
2497extern char *enum_name_string PROTO((tree, tree));
2498extern void report_case_error PROTO((int, tree, tree, tree));
46b02c6d 2499extern void check_for_new_typeid PROTO((char *,flagged_type_tree));
8d08fdba 2500
51c184be 2501/* in xref.c */
8d08fdba
MS
2502extern void GNU_xref_begin PROTO((char *));
2503extern void GNU_xref_end PROTO((int));
2504extern void GNU_xref_file PROTO((char *));
2505extern void GNU_xref_start_scope PROTO((HOST_WIDE_INT));
5566b478 2506extern void GNU_xref_end_scope PROTO((HOST_WIDE_INT, HOST_WIDE_INT, int, int));
00595019 2507extern void GNU_xref_ref PROTO((tree, char *));
8d08fdba
MS
2508extern void GNU_xref_decl PROTO((tree, tree));
2509extern void GNU_xref_call PROTO((tree, char *));
2510extern void GNU_xref_function PROTO((tree, tree));
2511extern void GNU_xref_assign PROTO((tree));
2512extern void GNU_xref_hier PROTO((char *, char *, int, int, int));
2513extern void GNU_xref_member PROTO((tree, tree));
2514
2515/* -- end of C++ */
2516
2517#endif /* not _CP_TREE_H */
This page took 0.486266 seconds and 5 git commands to generate.