OSDN Git Service

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