Annotation of gcc/cp-tree.h, revision 1.1.1.2

1.1       root        1: /* Definitions for C++ parsing and type checking.
                      2:    Copyright (C) 1987 Free Software Foundation, Inc.
                      3:    Hacked by Michael Tiemann ([email protected])
                      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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                     20: 
                     21: 
                     22: /* Borrow everything that is C from c-tree.h,
                     23:    but do so by copy, not by inclusion, since c-tree.h defines
                     24:    lang_identifier.  */
                     25: 
                     26: #ifndef PARANOID
                     27: #define PARANOID 0
                     28: #endif
                     29: #if PARANOID
                     30: #include <assert.h>
                     31: #endif
                     32: 
                     33: /* Language-dependent contents of an identifier.  */
                     34: 
                     35: struct lang_identifier
                     36: {
                     37:   struct tree_identifier ignore;
                     38:   tree global_value, local_value;
                     39:   tree class_value;
                     40:   tree class_template_info;
                     41:   struct lang_id2 *x;
                     42: };
                     43: 
                     44: struct lang_id2
                     45: {
                     46:   tree label_value, implicit_decl;
                     47:   tree type_desc, as_list, error_locus;
                     48: };
                     49: 
                     50: /* Macros for access to language-specific slots in an identifier.  */
                     51: 
                     52: #if !PARANOID
                     53: #define IDENTIFIER_GLOBAL_VALUE(NODE)  \
                     54:   (((struct lang_identifier *)(NODE))->global_value)
                     55: #define IDENTIFIER_CLASS_VALUE(NODE)   \
                     56:   (((struct lang_identifier *)(NODE))->class_value)
                     57: #define IDENTIFIER_LOCAL_VALUE(NODE)   \
                     58:   (((struct lang_identifier *)(NODE))->local_value)
                     59: #define IDENTIFIER_TEMPLATE(NODE)      \
                     60:   (((struct lang_identifier *)(NODE))->class_template_info)
                     61: #else
                     62: #define IDENTIFIER_LANG_SPECIFIC_PTR(NODE) \
                     63:   (assert (TREE_CODE (NODE) == IDENTIFIER_NODE),       \
                     64:    (struct lang_identifier *) (NODE))
                     65: #define IDENTIFIER_GLOBAL_VALUE(NODE)  \
                     66:   (((struct lang_identifier *)(NODE))->global_value)
                     67: #define IDENTIFIER_CLASS_VALUE(NODE)   \
                     68:   (((struct lang_identifier *)(NODE))->class_value)
                     69: #define IDENTIFIER_LOCAL_VALUE(NODE)   \
                     70:   (((struct lang_identifier *)(NODE))->local_value)
                     71: #define IDENTIFIER_TEMPLATE(NODE)      \
                     72:   (IDENTIFIER_LANG_SPECIFIC_PTR (NODE) -> class_template_info)
                     73: #endif
                     74: 
                     75: #if !PARANOID
                     76: #define IDENTIFIER_TYPE_VALUE(NODE) (TREE_TYPE (NODE))
                     77: #define SET_IDENTIFIER_TYPE_VALUE(NODE,TYPE) (TREE_TYPE (NODE) = TYPE)
                     78: #else
                     79: #define IDENTIFIER_TYPE_VALUE(NODE) (*IDENTIFIER_TYPE_VALUE_PTR(NODE))
                     80: #ifdef __GNUC__
                     81: __inline
                     82: #endif
                     83: static tree * IDENTIFIER_TYPE_VALUE_PTR(NODE) tree NODE; { return
                     84:   (assert (TREE_CODE (NODE) == IDENTIFIER_NODE),
                     85:    &TREE_TYPE (NODE)) ;}
                     86: #define SET_IDENTIFIER_TYPE_VALUE(NODE,TYPE) (IDENTIFIER_TYPE_VALUE(NODE)=TYPE)
                     87: #endif
                     88: #define IDENTIFIER_HAS_TYPE_VALUE(NODE) (TREE_TYPE (NODE) ? 1 : 0)
                     89: extern tree identifier_typedecl_value ();
                     90: #define IDENTIFIER_TYPEDECL_VALUE(NODE) identifier_typedecl_value (NODE)
                     91: 
                     92: #define IDENTIFIER_LABEL_VALUE(NODE)   \
                     93:   (((struct lang_identifier *)(NODE))->x \
                     94:    ? ((struct lang_identifier *)(NODE))->x->label_value : 0)
                     95: #define SET_IDENTIFIER_LABEL_VALUE(NODE,VALUE) \
                     96:   (((struct lang_identifier *)(NODE))->x == 0 ? ((struct lang_identifier *)(NODE))->x = (struct lang_id2 *)perm_calloc (1, sizeof (struct lang_id2)) : 0, \
                     97:    ((struct lang_identifier *)(NODE))->x->label_value = (VALUE))
                     98: #define IDENTIFIER_IMPLICIT_DECL(NODE) \
                     99:   (((struct lang_identifier *)(NODE))->x \
                    100:    ? ((struct lang_identifier *)(NODE))->x->implicit_decl : 0)
                    101: #define SET_IDENTIFIER_IMPLICIT_DECL(NODE,VALUE)       \
                    102:   (((struct lang_identifier *)(NODE))->x == 0 ? ((struct lang_identifier *)(NODE))->x = (struct lang_id2 *)perm_calloc (1, sizeof (struct lang_id2)) : 0, \
                    103:    ((struct lang_identifier *)(NODE))->x->implicit_decl = (VALUE))
                    104: #define IDENTIFIER_AS_DESC(NODE)               \
                    105:   (((struct lang_identifier *)(NODE))->x \
                    106:    ? ((struct lang_identifier *)(NODE))->x->type_desc : 0)
                    107: #define SET_IDENTIFIER_AS_DESC(NODE,DESC)      \
                    108:   (((struct lang_identifier *)(NODE))->x == 0 ? ((struct lang_identifier *)(NODE))->x = (struct lang_id2 *)perm_calloc (1, sizeof (struct lang_id2)) : 0, \
                    109:    ((struct lang_identifier *)(NODE))->x->type_desc = (DESC))
                    110: #define IDENTIFIER_AS_LIST(NODE)               \
                    111:   (((struct lang_identifier *)(NODE))->x \
                    112:    ? ((struct lang_identifier *)(NODE))->x->as_list : 0)
                    113: #define SET_IDENTIFIER_AS_LIST(NODE,LIST)      \
                    114:   (((struct lang_identifier *)(NODE))->x == 0 ? ((struct lang_identifier *)(NODE))->x = (struct lang_id2 *)perm_calloc (1, sizeof (struct lang_id2)) : 0, \
                    115:    ((struct lang_identifier *)(NODE))->x->as_list = (LIST))
                    116: #define IDENTIFIER_ERROR_LOCUS(NODE)   \
                    117:   (((struct lang_identifier *)(NODE))->x \
                    118:    ? ((struct lang_identifier *)(NODE))->x->error_locus : 0)
                    119: #define SET_IDENTIFIER_ERROR_LOCUS(NODE,VALUE) \
                    120:   (((struct lang_identifier *)(NODE))->x == 0 ? ((struct lang_identifier *)(NODE))->x = (struct lang_id2 *)perm_calloc (1, sizeof (struct lang_id2)) : 0, \
                    121:    ((struct lang_identifier *)(NODE))->x->error_locus = (VALUE))
                    122: 
                    123: /* Nonzero if this identifier is the prefix for a mangled C++ operator name.  */
                    124: #define IDENTIFIER_OPNAME_P(NODE) TREE_LANG_FLAG_2(NODE)
                    125: 
                    126: #define IDENTIFIER_TYPENAME_P(NODE)    \
                    127:   (! strncmp (IDENTIFIER_POINTER (NODE),                       \
1.1.1.2 ! root      128:              IDENTIFIER_POINTER (ansi_opname[(int) TYPE_EXPR]),        \
        !           129:              IDENTIFIER_LENGTH (ansi_opname[(int) TYPE_EXPR])))
1.1       root      130: 
                    131: /* Nonzero means reject anything that ANSI standard C forbids.  */
                    132: extern int pedantic;
                    133: 
                    134: /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only.  */
                    135: #define C_TYPE_FIELDS_READONLY(type) TYPE_LANG_FLAG_0 (type)
                    136: 
                    137: /* in tree.c */
                    138: extern tree purpose_member (), value_member ();
                    139: extern tree binfo_member ();
                    140: 
                    141: /* in cp-typeck.c */
                    142: extern tree build_component_ref(), build_conditional_expr();
                    143: extern tree build_x_compound_expr (), build_compound_expr();
                    144: extern tree build_unary_op(), build_binary_op(), build_function_call();
                    145: extern tree build_binary_op_nodefault ();
                    146: extern tree build_indirect_ref(), build_array_ref(), build_c_cast();
                    147: extern tree build_modify_expr();
                    148: extern tree c_sizeof (), c_alignof ();
                    149: extern tree store_init_value ();
                    150: extern tree digest_init ();
                    151: extern tree c_expand_start_case ();
                    152: extern tree default_conversion ();
                    153: 
                    154: /* Given two integer or real types, return the type for their sum.
                    155:    Given two compatible ANSI C types, returns the merged type.  */
                    156: 
                    157: extern tree common_type ();
                    158: 
                    159: /* in cp-decl.c */
                    160: extern tree build_label ();
                    161: 
                    162: /* If non-zero, a VAR_DECL whose cleanup will cause a throw to the
                    163:    next exception handler.  */
                    164: extern tree exception_throw_decl;
                    165: 
                    166: extern int start_function ();
                    167: extern void finish_function ();
                    168: extern void store_parm_decls ();
                    169: extern tree get_parm_info ();
                    170: 
                    171: extern void pushlevel ();
                    172: extern tree poplevel ();
                    173: 
                    174: extern tree groktypename(), lookup_name();
                    175: 
1.1.1.2 ! root      176: extern tree lookup_label(), define_label(), shadow_label ();
1.1       root      177: 
                    178: extern tree implicitly_declare(), getdecls(), gettags ();
                    179: 
                    180: extern tree start_decl();
                    181: extern void finish_decl();
                    182: 
                    183: extern tree start_struct(), finish_struct(), xref_tag(), xref_defn_tag();
                    184: extern tree finish_exception ();
                    185: extern tree grokfield(), grokbitfield ();
                    186: 
                    187: extern tree start_enum(), finish_enum();
                    188: extern tree build_enumerator();
                    189: 
                    190: extern tree make_index_type ();
                    191: extern tree make_anon_name ();
                    192: 
1.1.1.2 ! root      193: #if 0 /* not yet, should get fixed properly later */
        !           194: extern tree make_type_decl ();
        !           195: 
        !           196: #endif
1.1       root      197: /* Functions in c-common.c: */
                    198: 
                    199: /* Concatenate a list of STRING_CST nodes into one STRING_CST.  */
                    200: extern tree combine_strings ();
                    201: 
                    202: /* Validate the expression after `case' and apply default promotions.  */
                    203: extern tree check_case_value ();
                    204: 
                    205: /* Print an error message for invalid operands to arith operation CODE.
                    206:    NOP_EXPR is used as a special case (see truthvalue_conversion).  */
                    207: 
                    208: extern void binary_op_error ();
                    209: 
                    210: /* Subroutine of build_binary_op_nodefault, used for comparison operations.
                    211:    See if the operands have both been converted from subword integer types
                    212:    and, if so, perhaps change them both back to their original type.  */
                    213: 
                    214: extern tree shorten_compare ();
                    215: 
                    216: extern tree double_type_node, long_double_type_node, float_type_node;
                    217: extern tree char_type_node, unsigned_char_type_node, signed_char_type_node;
                    218: extern tree ptrdiff_type_node;
                    219: 
                    220: extern tree short_integer_type_node, short_unsigned_type_node;
                    221: extern tree long_integer_type_node, long_unsigned_type_node;
                    222: extern tree long_long_integer_type_node, long_long_unsigned_type_node;
                    223: extern tree unsigned_type_node;
                    224: extern tree string_type_node, char_array_type_node, int_array_type_node;
                    225: extern tree wchar_array_type_node;
                    226: extern tree wchar_type_node, signed_wchar_type_node, unsigned_wchar_type_node;
                    227: 
                    228: extern int current_function_returns_value;
                    229: extern int current_function_returns_null;
                    230: extern tree current_function_return_value;
                    231: 
                    232: extern tree ridpointers[];
                    233: extern tree ansi_opname[];
                    234: extern tree ansi_assopname[];
                    235: 
                    236: /* Nonzero means `$' can be in an identifier.  */
                    237: 
                    238: extern int dollars_in_ident;
                    239: 
                    240: /* Nonzero means allow type mismatches in conditional expressions;
                    241:    just make their values `void'.   */
                    242: 
                    243: extern int flag_cond_mismatch;
                    244: 
                    245: /* Nonzero means don't recognize the keyword `asm'.  */
                    246: 
                    247: extern int flag_no_asm;
                    248: 
                    249: /* For cross referencing.  */
                    250: 
                    251: extern int flag_gnu_xref;
                    252: 
                    253: /* For environments where you can use GNU binutils (as, ld in particular).  */
                    254: 
                    255: extern int flag_gnu_binutils;
                    256: 
                    257: /* Nonzero means warn about implicit declarations.  */
                    258: 
                    259: extern int warn_implicit;
                    260: 
                    261: /* Nonzero means warn about function definitions that default the return type
                    262:    or that use a null return and have a return-type other than void.  */
                    263: 
                    264: extern int warn_return_type, explicit_warn_return_type;
                    265: 
                    266: /* Nonzero means give string constants the type `const char *'
                    267:    to get extra warnings from them.  These warnings will be too numerous
                    268:    to be useful, except in thoroughly ANSIfied programs.  */
                    269: 
                    270: extern int warn_write_strings;
                    271: 
                    272: /* Nonzero means warn about sizeof(function) or addition/subtraction
                    273:    of function pointers.  */
                    274: 
                    275: extern int warn_pointer_arith;
                    276: 
                    277: /* Nonzero means warn for all old-style non-prototype function decls.  */
                    278: 
                    279: extern int warn_strict_prototypes;
                    280: 
                    281: /* Nonzero means warn about suggesting putting in ()'s.  */
                    282: 
                    283: extern int warn_parentheses;
                    284: 
                    285: /* Nonzero means warn about pointer casts that can drop a type qualifier
                    286:    from the pointer target type.  */
                    287: 
                    288: extern int warn_cast_qual;
                    289: 
                    290: /* Nonzero means do some things the same way PCC does.  */
                    291: 
                    292: extern int flag_traditional;
                    293: 
                    294: /* Nonzero means to treat bitfields as unsigned unless they say `signed'.  */
                    295: 
                    296: extern int flag_signed_bitfields;
                    297: 
                    298: /* 2 means write out only specific virtual function tables
                    299:    and give them (C) public visibility.
                    300:    1 means write out virtual function tables and give them
                    301:    (C) public visibility.
                    302:    0 means write out virtual function tables and give them
                    303:    (C) static visibility.
                    304:    -1 means declare virtual function tables extern.  */
                    305: 
                    306: extern int write_virtuals;
                    307: 
                    308: /* INTERFACE_ONLY nonzero means that we are in an "interface"
                    309:    section of the compiler.  INTERFACE_UNKNOWN nonzero means
                    310:    we cannot trust the value of INTERFACE_ONLY.  If INTERFACE_UNKNOWN
                    311:    is zero and INTERFACE_ONLY is zero, it means that we are responsible
                    312:    for exporting definitions that others might need.  */
                    313: extern int interface_only, interface_unknown;
                    314: 
                    315: /* Nonzero means we should attempt to elide constructors when possible.  */
                    316: 
                    317: extern int flag_elide_constructors;
                    318: 
                    319: /* Nonzero means recognize and handle exception handling constructs.  */
                    320: 
                    321: extern int flag_handle_exceptions;
                    322: 
                    323: /* Nonzero means recognize and handle ansi-style exception handling constructs.  */
                    324: 
                    325: extern int flag_ansi_exceptions;
                    326: 
                    327: /* Nonzero means that member functions defined in class scope are
                    328:    inline by default.  */
                    329: 
                    330: extern int flag_default_inline;
                    331: 
                    332: /* Nonzero means emit cadillac protocol.  */
                    333: 
                    334: extern int flag_cadillac;
                    335: 
                    336: /* C++ language-specific tree codes.  */
                    337: #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
                    338: enum cplus_tree_code {
                    339:   __DUMMY = LAST_AND_UNUSED_TREE_CODE,
                    340: #include "cp-tree.def"
                    341:   LAST_CPLUS_TREE_CODE
                    342: };
                    343: #undef DEFTREECODE
                    344: 
                    345: enum languages { lang_c, lang_cplusplus };
                    346: 
                    347: /* Macros to make error reporting functions' lives easier.  */
                    348: #if !PARANOID
                    349: #define TYPE_IDENTIFIER(NODE) (DECL_NAME (TYPE_NAME (NODE)))
                    350: #else
                    351: #define TYPE_IDENTIFIER(NODE) (*TYPE_IDENTIFIER_PTR (NODE))
                    352: #ifdef __GNUC__
                    353: __inline
                    354: #endif
                    355: static tree *
                    356: TYPE_IDENTIFIER_PTR(NODE) tree NODE; { return
                    357:   (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'),
                    358:    &DECL_NAME (TYPE_NAME (NODE))) ;}
                    359: #endif
                    360: 
                    361: #define TYPE_NAME_STRING(NODE) (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (NODE))))
                    362: #define TYPE_NAME_LENGTH(NODE) (IDENTIFIER_LENGTH (DECL_NAME (TYPE_NAME (NODE))))
                    363: 
                    364: #define IS_AGGR_TYPE_2(TYPE1,TYPE2) \
                    365:   (TREE_CODE (TYPE1) == TREE_CODE (TYPE2)      \
                    366:    && IS_AGGR_TYPE (TYPE1)&IS_AGGR_TYPE (TYPE2))
                    367: 
                    368: /* Macros which might want to be replaced by function calls.  */
                    369: 
                    370: #if 1
                    371: /* Virtual function addresses can be gotten from a virtual function
                    372:    table entry using this macro.  */
                    373: #define FNADDR_FROM_VTABLE_ENTRY(ENTRY) \
                    374:   TREE_VALUE (TREE_CHAIN (TREE_CHAIN (CONSTRUCTOR_ELTS (ENTRY))))
                    375: #define SET_FNADDR_FROM_VTABLE_ENTRY(ENTRY,VALUE) \
                    376:   (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (CONSTRUCTOR_ELTS (ENTRY)))) = (VALUE))
                    377: 
                    378: #define FUNCTION_ARG_CHAIN(NODE) (TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (NODE))))
                    379: #define PROMOTES_TO_AGGR_TYPE(NODE,CODE)       \
                    380:   (((CODE) == TREE_CODE (NODE)                 \
                    381:        && IS_AGGR_TYPE (TREE_TYPE (NODE)))     \
                    382:    || IS_AGGR_TYPE (NODE))
                    383: 
                    384: #else
                    385: extern tree fnaddr_from_vtable_entry ();
                    386: extern void set_fnaddr_from_vtable_entry ();
                    387: extern tree function_arg_chain ();
                    388: extern int promotes_to_aggr_type ();
                    389: extern int is_aggr_type_2 ();
                    390: #define FNADDR_FROM_VTABLE_ENTRY(ENTRY) (fnaddr_from_vtable_entry (ENTRY))
                    391: #define SET_FNADDR_FROM_VTABLE_ENTRY(ENTRY,VALUE) \
                    392:   (set_fnaddr_from_vtable_entry (ENTRY, VALUE))
                    393: /* #define TYPE_NAME_STRING(NODE) (type_name_string (NODE)) */
                    394: #define FUNCTION_ARG_CHAIN(NODE) (function_arg_chain (NODE))
                    395: #define PROMOTES_TO_AGGR_TYPE(NODE,CODE) (promotes_to_aggr_type (NODE, CODE))
                    396: /* #define IS_AGGR_TYPE_2(TYPE1, TYPE2) (is_aggr_type_2 (TYPE1, TYPE2)) */
                    397: #endif
                    398: /* Nonzero iff TYPE is derived from PARENT.  */
                    399: #define DERIVED_FROM_P(PARENT, TYPE) (get_base_distance (PARENT, TYPE, 0, 0) >= 0)
                    400: 
                    401: enum conversion_type { ptr_conv, constptr_conv, int_conv, real_conv, last_conversion_type };
                    402: 
                    403: /* Statistics show that while the GNU C++ compiler may generate
                    404:    thousands of different types during a compilation run, it
                    405:    generates relatively few (tens) of classtypes.  Because of this,
                    406:    it is not costly to store a generous amount of information
                    407:    in classtype nodes.  This struct must fill out to a multiple of 4 bytes.  */
                    408: struct lang_type
                    409: {
                    410:   struct
                    411:     {
                    412:       unsigned has_type_conversion : 1;
                    413:       unsigned has_int_conversion : 1;
                    414:       unsigned has_float_conversion : 1;
                    415:       unsigned has_init_ref : 1;
                    416:       unsigned gets_init_ref : 1;
                    417:       unsigned gets_init_aggr : 1;
                    418:       unsigned has_assignment : 1;
                    419:       unsigned gets_assignment : 1;
                    420: 
                    421:       unsigned needs_constructor : 1;
                    422:       unsigned has_default_ctor : 1;
                    423:       unsigned uses_multiple_inheritance : 1;
                    424:       unsigned const_needs_init : 1;
                    425:       unsigned ref_needs_init : 1;
                    426:       unsigned gets_const_init_ref : 1;
                    427:       unsigned has_const_assign_ref : 1;
                    428:       unsigned gets_const_assign_ref : 1;
                    429: 
                    430:       unsigned vtable_needs_writing : 1;
                    431:       unsigned has_assign_ref : 1;
                    432:       unsigned gets_assign_ref : 1;
                    433:       unsigned gets_new : 1;
                    434:       unsigned gets_delete : 1;
                    435:       unsigned has_call_overloaded : 1;
                    436:       unsigned has_array_ref_overloaded : 1;
                    437:       unsigned has_arrow_overloaded : 1;
                    438: 
                    439:       unsigned local_typedecls : 1;
                    440:       unsigned interface_only : 1;
                    441:       unsigned interface_unknown : 1;
                    442:       unsigned needs_virtual_reinit : 1;
                    443:       unsigned declared_exception : 1;
                    444:       unsigned declared_class : 1;
                    445:       unsigned being_defined : 1;
                    446:       unsigned redefined : 1;
                    447: 
                    448:       unsigned marked : 1;
                    449:       unsigned marked2 : 1;
                    450:       unsigned marked3 : 1;
                    451:       unsigned marked4 : 1;
                    452:       unsigned marked5 : 1;
                    453:       unsigned marked6 : 1;
                    454:       unsigned use_template : 2;
                    455: 
                    456:       unsigned debug_requested : 1;
                    457:       unsigned dynamic : 1;
                    458:       unsigned has_wrapper_pred : 1;
                    459:       unsigned has_method_call_overloaded : 1;
                    460:       unsigned private_attr : 1;
                    461:       unsigned alters_visibilities : 1;
                    462:       unsigned got_semicolon : 1;
                    463:       unsigned dummy : 1;
                    464: 
                    465:       /* The MIPS compiler gets it wrong if this struct also
                    466:         does not fill out to a multiple of 4 bytes.  */
                    467:       unsigned n_vancestors : 16;
                    468:     } type_flags;
                    469: 
                    470:   int cid;
                    471:   int n_ancestors;
                    472:   int vsize;
                    473:   int max_depth;
                    474: 
                    475:   union tree_node *vbinfo[2];
                    476:   union tree_node *baselink_vec;
                    477:   union tree_node *vfields;
                    478:   union tree_node *vbases;
                    479:   union tree_node *vbase_size;
                    480: 
                    481:   union tree_node *tags;
                    482:   char *memoized_table_entry;
                    483: 
                    484:   char *search_slot;
                    485: 
                    486: #ifdef ONLY_INT_FIELDS
                    487:   unsigned int mode : 8;
                    488: #else
                    489:   enum machine_mode mode : 8;
                    490: #endif
                    491: 
                    492:   unsigned char size_unit;
                    493:   unsigned char align;
                    494:   unsigned char sep_unit;
                    495: 
                    496:   union tree_node *sep;
                    497:   union tree_node *size;
                    498: 
                    499:   union tree_node *base_init_list;
                    500:   union tree_node *abstract_virtuals;
                    501:   union tree_node *as_list;
                    502:   union tree_node *id_as_list;
                    503:   union tree_node *binfo_as_list;
                    504:   union tree_node *vtbl_ptr;
                    505:   union tree_node *instance_variable;
                    506:   union tree_node *friend_classes;
                    507: 
                    508:   char *mi_matrix;
                    509:   union tree_node *conversions[last_conversion_type];
                    510:   union tree_node *wrap_type;
                    511: 
                    512:   union tree_node *dossier;
                    513: 
                    514: #ifdef SOS
                    515:   union tree_node *typename_as_string;
                    516:   union tree_node *dynamic_filename;
                    517:   union tree_node *dynamic_table;
                    518: #endif
                    519: };
                    520: 
                    521: /* Indicates whether a template should be (or has been) expanded for this
                    522:    class definition.  0=do, 1=did, 2=don't, 3=didn't.  */
                    523: #define CLASSTYPE_USE_TEMPLATE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.use_template)
                    524: 
                    525: /* Fields used for storing information before the class is defined.
                    526:    After the class is defined, these fields hold other information.  */
                    527: 
                    528: /* List of friends which were defined inline in this class definition.  */
                    529: #define CLASSTYPE_INLINE_FRIENDS(NODE) (TYPE_NONCOPIED_PARTS (NODE))
                    530: 
                    531: /* Nonzero for _CLASSTYPE means that the _CLASSTYPE either has
                    532:    a special meaning for the assignment operator ("operator="),
                    533:    or one of its fields (or base members) has a special meaning
                    534:    defined.  */
                    535: #define TYPE_HAS_ASSIGNMENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_assignment)
                    536: #define TYPE_GETS_ASSIGNMENT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_assignment)
                    537: 
                    538: /* Nonzero for _CLASSTYPE means that operator new and delete are defined,
                    539:    respectively.  */
                    540: #define TREE_GETS_NEW(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_new)
                    541: #define TREE_GETS_DELETE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_delete)
                    542: 
                    543: /* Nonzero for TREE_LIST or _TYPE node means that this node is class-local.  */
                    544: #define TREE_NONLOCAL_FLAG(NODE) (TREE_LANG_FLAG_0 (NODE))
                    545: 
                    546: /* Ditto, for `private' declarations.  */
                    547: #define TREE_VIA_PRIVATE(NODE) ((NODE)->common.private_flag)
                    548: 
                    549: /* Nonzero for TREE_LIST node means that the path to the
                    550:    base class is via a `protected' declaration, which preserves
                    551:    protected fields from the base class as protected.
                    552:    OVERLOADED.  */
                    553: #define TREE_VIA_PROTECTED(NODE) ((NODE)->common.static_flag)
                    554: 
                    555: /* Nonzero for a _CLASSTYPE node which we know to be private.  */
                    556: #define TYPE_PRIVATE_P(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.private_attr)
                    557: 
                    558: /* Nonzero means that this _CLASSTYPE node defines ways of converting
                    559:    itself to other types.  */
                    560: #define TYPE_HAS_CONVERSION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_type_conversion)
                    561: 
                    562: /* Nonzero means that this _CLASSTYPE node can convert itself to an
                    563:    INTEGER_TYPE.  */
                    564: #define TYPE_HAS_INT_CONVERSION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_int_conversion)
                    565: 
                    566: /* Nonzero means that this _CLASSTYPE node can convert itself to an
                    567:    REAL_TYPE.  */
                    568: #define TYPE_HAS_REAL_CONVERSION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_float_conversion)
                    569: 
                    570: /* Nonzero means that this _CLASSTYPE node overloads operator=(X&).  */
                    571: #define TYPE_HAS_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_assign_ref)
                    572: #define TYPE_GETS_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_assign_ref)
                    573: #define TYPE_HAS_CONST_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_const_assign_ref)
                    574: #define TYPE_GETS_CONST_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_const_assign_ref)
                    575: 
                    576: /* Nonzero means that this _CLASSTYPE node has an X(X&) constructor.  */
                    577: #define TYPE_HAS_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_init_ref)
                    578: #define TYPE_GETS_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_init_ref)
                    579: #define TYPE_GETS_CONST_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_const_init_ref)
                    580: 
                    581: /* Nonzero means that this _CLASSTYPE node has an X(X ...) constructor.
                    582:    Note that there must be other arguments, or this constructor is flaged
                    583:    as being erroneous.  */
                    584: #define TYPE_GETS_INIT_AGGR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.gets_init_aggr)
                    585: 
                    586: /* Nonzero means that this type is being defined.  I.e., the left brace
                    587:    starting the definition of this type has been seen.  */
                    588: #define TYPE_BEING_DEFINED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.being_defined)
                    589: /* Nonzero means that this type has been redefined.  In this case, if
                    590:    convenient, don't reprocess any methods that appear in its redefinition.  */
                    591: #define TYPE_REDEFINED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.redefined)
                    592: 
                    593: /* Nonzero means that this _CLASSTYPE node overloads the method call
                    594:    operator.  In this case, all method calls go through `operator->()(...).  */
                    595: #define TYPE_OVERLOADS_METHOD_CALL_EXPR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_method_call_overloaded)
                    596: 
                    597: /* The is the VAR_DECL that contains NODE's dossier.  */
                    598: #define CLASSTYPE_DOSSIER(NODE) (TYPE_LANG_SPECIFIC(NODE)->dossier)
                    599: 
                    600: #define TYPE_WRAP_TYPE(NODE) (TYPE_LANG_SPECIFIC(NODE)->wrap_type)
                    601: 
                    602: #define TYPE_HAS_WRAPPER(NODE) (TYPE_LANG_SPECIFIC(NODE)->wrap_type == TYPE_MAIN_VARIANT (NODE))
                    603: #define TYPE_NEEDS_WRAPPER(NODE) (TYPE_LANG_SPECIFIC(NODE)->wrap_type != 0 && TYPE_LANG_SPECIFIC(NODE)->wrap_type != TYPE_MAIN_VARIANT (NODE))
                    604: #define TYPE_HAS_WRAPPER_PRED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_wrapper_pred)
                    605: 
                    606: /* Nonzero means that this _CLASSTYPE node overloads operator().  */
                    607: #define TYPE_OVERLOADS_CALL_EXPR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_call_overloaded)
                    608: 
                    609: /* Nonzero means that this _CLASSTYPE node overloads operator[].  */
                    610: #define TYPE_OVERLOADS_ARRAY_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_array_ref_overloaded)
                    611: 
                    612: /* Nonzero means that this _CLASSTYPE node overloads operator->.  */
                    613: #define TYPE_OVERLOADS_ARROW(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_arrow_overloaded)
                    614: 
                    615: /* Nonzero means that this _CLASSTYPE (or one of its ancestors) uses
                    616:    multiple inheritance.  If this is 0 for the root of a type
                    617:    hierarchy, then we can use more efficient search techniques.  */
                    618: #define TYPE_USES_MULTIPLE_INHERITANCE(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.uses_multiple_inheritance)
                    619: 
                    620: /* Nonzero means that this _CLASSTYPE (or one of its ancestors) uses
                    621:    virtual base classes.  If this is 0 for the root of a type
                    622:    hierarchy, then we can use more efficient search techniques.  */
                    623: #define TYPE_USES_VIRTUAL_BASECLASSES(NODE) (TREE_LANG_FLAG_3(NODE))
                    624: 
                    625: /* List of lists of member functions defined in this class.  */
                    626: #define CLASSTYPE_METHOD_VEC(NODE) TYPE_METHODS(NODE)
                    627: 
                    628: /* Pointer from any member function to the head of the list of
                    629:    member functions of the type that member function belongs to.  */
                    630: #define CLASSTYPE_BASELINK_VEC(NODE) (TYPE_LANG_SPECIFIC(NODE)->baselink_vec)
                    631: 
                    632: /* Mark bits for depth-first and breath-first searches.  */
                    633: #if !PARANOID
                    634: #define CLASSTYPE_MARKED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked)
                    635: #define CLASSTYPE_MARKED2(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked2)
                    636: #define CLASSTYPE_MARKED3(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked3)
                    637: #define CLASSTYPE_MARKED4(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked4)
                    638: #define CLASSTYPE_MARKED5(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked5)
                    639: #define CLASSTYPE_MARKED6(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.marked6)
                    640: /* Macros to modify the above flags */
                    641: #define SET_CLASSTYPE_MARKED(NODE) (CLASSTYPE_MARKED(NODE) = 1)
                    642: #define CLEAR_CLASSTYPE_MARKED(NODE) (CLASSTYPE_MARKED(NODE) = 0)
                    643: #define SET_CLASSTYPE_MARKED2(NODE) (CLASSTYPE_MARKED2(NODE) = 1)
                    644: #define CLEAR_CLASSTYPE_MARKED2(NODE) (CLASSTYPE_MARKED2(NODE) = 0)
                    645: #define SET_CLASSTYPE_MARKED3(NODE) (CLASSTYPE_MARKED3(NODE) = 1)
                    646: #define CLEAR_CLASSTYPE_MARKED3(NODE) (CLASSTYPE_MARKED3(NODE) = 0)
                    647: #define SET_CLASSTYPE_MARKED4(NODE) (CLASSTYPE_MARKED4(NODE) = 1)
                    648: #define CLEAR_CLASSTYPE_MARKED4(NODE) (CLASSTYPE_MARKED4(NODE) = 0)
                    649: #define SET_CLASSTYPE_MARKED5(NODE) (CLASSTYPE_MARKED5(NODE) = 1)
                    650: #define CLEAR_CLASSTYPE_MARKED5(NODE) (CLASSTYPE_MARKED5(NODE) = 0)
                    651: #define SET_CLASSTYPE_MARKED6(NODE) (CLASSTYPE_MARKED6(NODE) = 1)
                    652: #define CLEAR_CLASSTYPE_MARKED6(NODE) (CLASSTYPE_MARKED6(NODE) = 0)
                    653: #else
                    654: #define CLASSTYPE_MARKED(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked)
                    655: #define CLASSTYPE_MARKED2(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked2)
                    656: #define CLASSTYPE_MARKED3(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked3)
                    657: #define CLASSTYPE_MARKED4(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked4)
                    658: #define CLASSTYPE_MARKED5(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked5)
                    659: #define CLASSTYPE_MARKED6(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked6)
                    660: /* Macros to modify the above flags */
                    661: #define SET_CLASSTYPE_MARKED(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked = 1)
                    662: #define CLEAR_CLASSTYPE_MARKED(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked = 0)
                    663: #define SET_CLASSTYPE_MARKED2(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked2 = 1)
                    664: #define CLEAR_CLASSTYPE_MARKED2(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked2 = 0)
                    665: #define SET_CLASSTYPE_MARKED3(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked3 = 1)
                    666: #define CLEAR_CLASSTYPE_MARKED3(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked3 = 0)
                    667: #define SET_CLASSTYPE_MARKED4(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked4 = 1)
                    668: #define CLEAR_CLASSTYPE_MARKED4(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked4 = 0)
                    669: #define SET_CLASSTYPE_MARKED5(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked5 = 1)
                    670: #define CLEAR_CLASSTYPE_MARKED5(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked5 = 0)
                    671: #define SET_CLASSTYPE_MARKED6(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked6 = 1)
                    672: #define CLEAR_CLASSTYPE_MARKED6(NODE) (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 't'), TYPE_LANG_SPECIFIC(NODE)->type_flags.marked6 = 0)
                    673: #endif
                    674: 
                    675: #define CLASSTYPE_TAGS(NODE) (TYPE_LANG_SPECIFIC(NODE)->tags)
                    676: #define CLASSTYPE_NAMES(NODE) (TYPE_LANG_SPECIFIC(NODE)->names)
                    677: 
                    678: /* Remove when done merging.  */
                    679: #define CLASSTYPE_VFIELD(NODE) TYPE_VFIELD(NODE)
                    680: 
                    681: /* The number of virtual functions defined for this
                    682:    _CLASSTYPE node.  */
                    683: #define CLASSTYPE_VSIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->vsize)
                    684: /* The virtual base classes that this type uses.  */
                    685: #define CLASSTYPE_VBASECLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->vbases)
                    686: /* The virtual function pointer fields that this type contains.  */
                    687: #define CLASSTYPE_VFIELDS(NODE) (TYPE_LANG_SPECIFIC(NODE)->vfields)
                    688: 
                    689: /* Number of baseclasses defined for this type.
                    690:    0 means no base classes.  */
                    691: #define CLASSTYPE_N_BASECLASSES(NODE) \
                    692:   (TYPE_BINFO_BASETYPES (NODE) ? TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES(NODE)) : 0)
                    693: 
                    694: /* Memoize the number of super classes (base classes) tha this node
                    695:    has.  That way we can know immediately (albeit conservatively how
                    696:    large a multiple-inheritance matrix we need to build to find
                    697:    derivation information.  */
                    698: #define CLASSTYPE_N_SUPERCLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->n_ancestors)
                    699: #define CLASSTYPE_N_VBASECLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.n_vancestors)
                    700: 
                    701: /* Record how deep the inheritance is for this class so `void*' conversions
                    702:    are less favorable than a conversion to the most base type.  */
                    703: #define CLASSTYPE_MAX_DEPTH(NODE) (TYPE_LANG_SPECIFIC(NODE)->max_depth)
                    704: 
                    705: /* Used for keeping search-specific information.  Any search routine
                    706:    which uses this must define what exactly this slot is used for.  */
                    707: #define CLASSTYPE_SEARCH_SLOT(NODE) (TYPE_LANG_SPECIFIC(NODE)->search_slot)
                    708: 
                    709: /* Entry for keeping memoization tables for this type to
                    710:    hopefully speed up search routines.  Since it is a pointer,
                    711:    it can mean almost anything.  */
                    712: #define CLASSTYPE_MTABLE_ENTRY(NODE) (TYPE_LANG_SPECIFIC(NODE)->memoized_table_entry)
                    713: 
                    714: /* This is the total size of the baseclasses defined for this type.
                    715:    Needed because it is desirable to layout such information
1.1.1.2 ! root      716:    before beginning to process the class itself, and we
1.1       root      717:    don't want to compute it second time when actually laying
                    718:    out the type for real.  */
                    719: #define CLASSTYPE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->size)
                    720: #define CLASSTYPE_SIZE_UNIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->size_unit)
                    721: #define CLASSTYPE_MODE(NODE) (TYPE_LANG_SPECIFIC(NODE)->mode)
                    722: #define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align)
                    723: 
                    724: /* This is the space needed for virtual base classes.  NULL if
                    725:    there are no virtual basetypes.  */
                    726: #define CLASSTYPE_VBASE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->vbase_size)
                    727: 
                    728: /* A cons list of structure elements which either have constructors
                    729:    to be called, or virtual function table pointers which
                    730:    need initializing.  Depending on what is being initialized,
                    731:    the TREE_PURPOSE and TREE_VALUE fields have different meanings:
                    732: 
                    733:    Member initialization: <FIELD_DECL, TYPE>
                    734:    Base class construction: <NULL_TREE, BASETYPE>
1.1.1.2 ! root      735:    Base class initialization: <BASE_INITIALIZATION, THESE_INITIALIZATIONS>
1.1       root      736:    Whole type: <MEMBER_INIT, BASE_INIT>.  */
                    737: #define CLASSTYPE_BASE_INIT_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->base_init_list)
                    738: 
                    739: /* A cons list of virtual functions which cannot be inherited by
                    740:    derived classes.  When deriving from this type, the derived
                    741:    class must provide its own definition for each of these functions.  */
                    742: #define CLASSTYPE_ABSTRACT_VIRTUALS(NODE) (TYPE_LANG_SPECIFIC(NODE)->abstract_virtuals)
                    743: 
                    744: #define CLASSTYPE_ALTERS_VISIBILITIES_P(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.alters_visibilities)
                    745: 
                    746: /* Nonzero means that this aggr type has been `closed' by a semicolon.  */
                    747: #define CLASSTYPE_GOT_SEMICOLON(NODE) (TYPE_LANG_SPECIFIC (NODE)->type_flags.got_semicolon)
                    748: 
                    749: /* Nonzero means that the main virtual function table pointer needs to be
                    750:    set because base constructors have placed the wrong value there.
                    751:    If this is zero, it means that they placed the right value there,
                    752:    and there is no need to change it.  */
                    753: #define CLASSTYPE_NEEDS_VIRTUAL_REINIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.needs_virtual_reinit)
                    754: 
                    755: /* Nonzero means that if this type has virtual functions, that
                    756:    the virtual function table will be written out.  */
                    757: #define CLASSTYPE_VTABLE_NEEDS_WRITING(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.vtable_needs_writing)
                    758: 
                    759: /* Nonzero means that this type defines its own local type declarations.  */
                    760: #define CLASSTYPE_LOCAL_TYPEDECLS(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.local_typedecls)
                    761: 
                    762: /* Nonzero means that this type has an X() constructor.  */
                    763: #define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_default_ctor)
                    764: 
                    765: /* Many routines need to cons up a list of basetypes for visibility
                    766:    checking.  This field contains a TREE_LIST node whose TREE_VALUE
                    767:    is the main variant of the type, and whose TREE_VIA_PUBLIC
                    768:    and TREE_VIA_VIRTUAL bits are correctly set.  */
                    769: #define CLASSTYPE_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->as_list)
                    770: /* Same, but cache a list whose value is the name of this type.  */
                    771: #define CLASSTYPE_ID_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->id_as_list)
                    772: /* Same, but cache a list whose value is the binfo of this type.  */
                    773: #define CLASSTYPE_BINFO_AS_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->binfo_as_list)
                    774: 
                    775: /* Slot in which to cache a copy of the local vtable pointer.  */
                    776: #define CLASSTYPE_VTBL_PTR(NODE) (TYPE_LANG_SPECIFIC(NODE)->vtbl_ptr)
                    777: 
                    778: /* Hold the instance object associated with this method.  */
                    779: #define CLASSTYPE_INST_VAR(NODE) (TYPE_LANG_SPECIFIC(NODE)->instance_variable)
                    780: 
                    781: /* A list of class types with which this type is a friend.  */
                    782: #define CLASSTYPE_FRIEND_CLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->friend_classes)
                    783: 
                    784: /* Keep an inheritance lattice around so we can quickly tell whether
                    785:    a type is derived from another or not.  */
                    786: #define CLASSTYPE_MI_MATRIX(NODE) (TYPE_LANG_SPECIFIC(NODE)->mi_matrix)
                    787: 
                    788: /* If there is exactly one conversion to a non-void, non-const pointer type,
                    789:    remember that here.  If there are more than one, put
                    790:    `error_mark_node' here.  If there are none, this holds NULL_TREE.  */
                    791: #define CLASSTYPE_CONVERSION(NODE,KIND) \
                    792:   (TYPE_LANG_SPECIFIC(NODE)->conversions[(int) KIND])
                    793: 
                    794: /* Nonzero means that class is "dynamic" in SOS sense.  (IRIA-specific.)  */
                    795: #define TYPE_DYNAMIC(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.dynamic)
                    796: 
                    797: #ifdef SOS
                    798: /* The name of this type as a STRING.  */
                    799: #define CLASSTYPE_TYPENAME_AS_STRING(NODE) (TYPE_LANG_SPECIFIC(NODE)->typename_as_string)
                    800: /* The name of the file which defines this type.  */
                    801: #define CLASSTYPE_DYNAMIC_FILENAME(NODE) (TYPE_LANG_SPECIFIC(NODE)->dynamic_filename)
                    802: /* The table of all member functions, linearized.  */
                    803: #define CLASSTYPE_DYNAMIC_TABLE(NODE) (TYPE_LANG_SPECIFIC(NODE)->dynamic_table)
                    804: #endif
                    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: /* Say whether this node was declared as a "class" or a "struct".  */
                    809: #define CLASSTYPE_DECLARED_EXCEPTION(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.declared_exception)
                    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: 
                    824: /* Nonzero if a _DECL node requires us to output debug info for this class.  */
                    825: #define CLASSTYPE_DEBUG_REQUESTED(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.debug_requested)
                    826: 
                    827: /* Additional macros for inheritance information.  */
                    828: 
                    829: #define CLASSTYPE_VBINFO(NODE,VIA_PUBLIC) \
                    830:   (TYPE_LANG_SPECIFIC (NODE)->vbinfo[VIA_PUBLIC])
                    831: 
                    832: /* When following an binfo-specific chain, this is the cumulative
                    833:    via-public flag.  */
                    834: #define BINFO_VIA_PUBLIC(NODE) TREE_LANG_FLAG_5 (NODE)
                    835: 
                    836: /* When building a matrix to determine by a single lookup
                    837:    whether one class is derived from another or not,
                    838:    this field is the index of the class in the table.  */
                    839: #define CLASSTYPE_CID(NODE) (TYPE_LANG_SPECIFIC(NODE)->cid)
                    840: #define BINFO_CID(NODE) CLASSTYPE_CID(BINFO_TYPE(NODE))
                    841: 
                    842: /* Nonzero means marked by DFS or BFS search, including searches
                    843:    by `get_binfo' and `get_base_distance'.  */
                    844: #define BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED(BINFO_TYPE(NODE)):TREE_LANG_FLAG_0(NODE))
                    845: /* Macros needed because of C compilers that don't allow conditional
                    846:    expressions to be lvalues.  Grr!  */
                    847: #define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=1))
                    848: #define CLEAR_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=0))
                    849: 
                    850: /* Nonzero means marked in building initialization list.  */
                    851: #define BINFO_BASEINIT_MARKED(NODE) CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
                    852: /* Modifier macros */
                    853: #define SET_BINFO_BASEINIT_MARKED(NODE) SET_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
                    854: #define CLEAR_BINFO_BASEINIT_MARKED(NODE) CLEAR_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
                    855: 
                    856: /* Nonzero means marked in search through virtual inheritance hierarchy.  */
                    857: #define BINFO_VBASE_MARKED(NODE) CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
                    858: /* Modifier macros */
                    859: #define SET_BINFO_VBASE_MARKED(NODE) SET_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
                    860: #define CLEAR_BINFO_VBASE_MARKED(NODE) CLEAR_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
                    861: 
                    862: /* Nonzero means marked in search for members or member functions.  */
                    863: #define BINFO_FIELDS_MARKED(NODE) \
                    864:   (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED2 (BINFO_TYPE (NODE)):TREE_LANG_FLAG_2(NODE))
                    865: #define SET_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=1))
                    866: #define CLEAR_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=0))
                    867: 
                    868: /* Nonzero means that this class is on a path leading to a new vtable.  */
                    869: #define BINFO_VTABLE_PATH_MARKED(NODE) \
                    870:   (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):TREE_LANG_FLAG_3(NODE))
                    871: #define SET_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=1))
                    872: #define CLEAR_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=0))
                    873: 
                    874: /* Nonzero means that this class has a new vtable.  */
                    875: #define BINFO_NEW_VTABLE_MARKED(NODE) \
                    876:   (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):TREE_LANG_FLAG_4(NODE))
                    877: #define SET_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=1))
                    878: #define CLEAR_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=0))
                    879: 
                    880: /* Nonzero means this class has initialized its virtual baseclasses.  */
                    881: #define BINFO_VBASE_INIT_MARKED(NODE) \
                    882:   (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED5(BINFO_TYPE(NODE)):TREE_LANG_FLAG_5(NODE))
                    883: #define SET_BINFO_VBASE_INIT_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED5(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_5(NODE)=1))
                    884: #define CLEAR_BINFO_VBASE_INIT_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED5(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_5(NODE)=0))
                    885: 
                    886: /* Accessor macros for the vfield slots in structures.  */
                    887: 
                    888: /* Get the assoc info that caused this vfield to exist.  */
                    889: #define VF_BINFO_VALUE(NODE) TREE_PURPOSE (NODE)
                    890: 
                    891: /* Get that same information as a _TYPE.  */
                    892: #define VF_BASETYPE_VALUE(NODE) TREE_VALUE (NODE)
                    893: 
                    894: /* Get the value of the top-most type dominating the non-`normal' vfields.  */
                    895: #define VF_DERIVED_VALUE(NODE) (VF_BINFO_VALUE (NODE) ? BINFO_TYPE (VF_BINFO_VALUE (NODE)) : NULL_TREE)
                    896: 
                    897: /* Get the value of the top-most type that's `normal' for the vfield.  */
                    898: #define VF_NORMAL_VALUE(NODE) TREE_TYPE (NODE)
                    899: 
                    900: /* Nonzero for TREE_LIST node means that this list of things
                    901:    is a list of parameters, as opposed to a list of expressions.  */
                    902: #define TREE_PARMLIST(NODE) ((NODE)->common.unsigned_flag) /* overloaded! */
                    903: 
                    904: /* Nonzero for FIELD_DECL node means that this FIELD_DECL is
                    905:    a member of an anonymous union construct.  The name of the
                    906:    union is .  */
                    907: #define TREE_ANON_UNION_ELEM(NODE) ((NODE)->decl.regdecl_flag) /* overloaded! */
                    908: 
                    909: /* For FUNCTION_TYPE or METHOD_TYPE, a list of the exceptions that
                    910:    this type can raise.  */
                    911: #define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_NONCOPIED_PARTS (NODE)
                    912: 
                    913: struct lang_decl_flags
                    914: {
                    915: #ifdef ONLY_INT_FIELDS
                    916:   int language : 8;
                    917: #else
                    918:   enum languages language : 8;
                    919: #endif
                    920: 
                    921:   unsigned operator_attr : 1;
                    922:   unsigned constructor_attr : 1;
                    923:   unsigned returns_first_arg : 1;
                    924:   unsigned preserves_first_arg : 1;
                    925:   unsigned friend_attr : 1;
                    926:   unsigned static_function : 1;
                    927:   unsigned const_memfunc : 1;
                    928:   unsigned volatile_memfunc : 1;
                    929: 
                    930:   unsigned abstract_virtual : 1;
                    931:   unsigned permanent_attr : 1 ;
                    932:   unsigned constructor_for_vbase_attr : 1;
                    933:   unsigned dummy : 13;
                    934: 
                    935:   tree visibility;
                    936:   tree context;
                    937: };
                    938: 
                    939: struct lang_decl
                    940: {
                    941:   struct lang_decl_flags decl_flags;
                    942: 
                    943:   struct template_info *template_info;
                    944:   tree main_decl_variant;
                    945:   struct pending_inline *pending_inline_info;
                    946:   tree vbase_init_list;
                    947:   tree chain;
                    948: 
                    949: #ifdef SOS
                    950:   tree dynamic_index;
                    951: #endif
                    952: };
                    953: 
                    954: /* Non-zero if NODE is a _DECL with TREE_READONLY set.  */
                    955: #define TREE_READONLY_DECL_P(NODE) \
                    956:   (TREE_READONLY (NODE) && TREE_CODE_CLASS (TREE_CODE (NODE)) == 'd')
                    957: 
                    958: /* For FUNCTION_DECLs: return the language in which this decl
                    959:    was declared.  */
                    960: #define DECL_LANGUAGE(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.language)
                    961: 
                    962: /* For FUNCTION_DECLs: nonzero means that this function is a constructor.  */
                    963: #define DECL_CONSTRUCTOR_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_attr)
                    964: /* For FUNCTION_DECLs: nonzero means that this function is a constructor
                    965:    for an object with virtual baseclasses.  */
                    966: #define DECL_CONSTRUCTOR_FOR_VBASE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.constructor_for_vbase_attr)
                    967: 
                    968: /* For FUNCTION_DECLs: nonzero means that the constructor
                    969:    is known to return a non-zero `this' unchanged.  */
                    970: #define DECL_RETURNS_FIRST_ARG(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.returns_first_arg)
                    971: 
                    972: /* Nonzero for FUNCTION_DECL means that this constructor is known to
                    973:    not make any assignment to `this', and therefore can be trusted
                    974:    to return it unchanged.  Otherwise, we must re-assign `current_class_decl'
                    975:    after performing base initializations.  */
                    976: #define DECL_PRESERVES_THIS(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.preserves_first_arg)
                    977: 
                    978: /* Nonzero for _DECL means that this decl appears in (or will appear
                    979:    in) as a member in a RECORD_TYPE or UNION_TYPE node.  It is also for
                    980:    detecting circularity in case members are multiply defined.  In the
1.1.1.2 ! root      981:    case of a VAR_DECL, it is also used to determine how program storage
1.1       root      982:    should be allocated.  */
                    983: #define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3(NODE))
                    984: 
                    985: /* Nonzero for FUNCTION_DECL means that this decl is just a
                    986:    friend declaration, and should not be added to the list of
                    987:    member functions for this class.  */
                    988: #define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.friend_attr)
                    989: 
                    990: /* Nonzero for FUNCTION_DECL means that this decl is a static
                    991:    member function.  */
                    992: #define DECL_STATIC_FUNCTION_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.static_function)
                    993: 
                    994: /* Nonzero for FUNCTION_DECL means that this member function
                    995:    has `this' as const X *const.  */
                    996: #define DECL_CONST_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.const_memfunc)
                    997: 
                    998: /* Nonzero for FUNCTION_DECL means that this member function
                    999:    has `this' as volatile X *const.  */
                   1000: #define DECL_VOLATILE_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.volatile_memfunc)
                   1001: 
                   1002: /* Nonzero for FUNCTION_DECL means that this member function
                   1003:    exists only as part of an abstract class's interface.  */
                   1004: #define DECL_ABSTRACT_VIRTUAL_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.abstract_virtual)
                   1005: 
                   1006: /* Nonzero if allocated on permanent_obstack.  */
                   1007: #define LANG_DECL_PERMANENT(LANGDECL) ((LANGDECL)->decl_flags.permanent_attr)
                   1008: 
                   1009: /* The _TYPE context in which this _DECL appears.  This field is used
                   1010:    only to compute visibility information.  */
                   1011: #define DECL_CLASS_CONTEXT(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.context)
                   1012: 
                   1013: /* For a FUNCTION_DECL: the chain through which the next method
                   1014:    in the method chain is found.  We now use TREE_CHAIN to
                   1015:    link into the FIELD_DECL chain.  */
                   1016: #if 1
                   1017: #define DECL_CHAIN(NODE) (DECL_LANG_SPECIFIC(NODE)->chain)
                   1018: #else
                   1019: #define DECL_CHAIN(NODE) (TREE_CHAIN (NODE))
                   1020: #endif
                   1021: 
                   1022: /* Points back to the decl which caused this lang_decl to be allocated.  */
                   1023: #define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)
                   1024: 
                   1025: /* For a FUNCTION_DECL: if this function was declared inline inside of
                   1026:    a class declaration, this is where the text for the function is
                   1027:    squirreled away.  */
                   1028: #define DECL_PENDING_INLINE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->pending_inline_info)
                   1029: 
                   1030: /* Holds information about how virtual base classes should be initialized
                   1031:    by this constructor *if* this constructor is the one to perform
                   1032:    such initialization.  */
                   1033: #define DECL_VBASE_INIT_LIST(NODE) (DECL_LANG_SPECIFIC(NODE)->vbase_init_list)
                   1034: 
                   1035: /* For a TEMPLATE_DECL: template-specific information.  */
                   1036: #define DECL_TEMPLATE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->template_info)
                   1037: 
                   1038: /* Nonzero in INT_CST means that this int is negative by dint of
                   1039:    using a twos-complement negated operand.  */
                   1040: #define TREE_NEGATED_INT(NODE) (TREE_LANG_FLAG_0 (NODE))
                   1041: 
                   1042: /* Nonzero in any kind of _EXPR or _REF node means that it is a call
                   1043:    to a storage allocation routine.  If, later, alternate storage
                   1044:    is found to hold the object, this call can be ignored.  */
                   1045: #define TREE_CALLS_NEW(NODE) (TREE_LANG_FLAG_1 (NODE))
                   1046: 
                   1047: /* Nonzero in any kind of _TYPE that uses multiple inheritance
                   1048:    or virtual baseclasses.  */
                   1049: #define TYPE_USES_COMPLEX_INHERITANCE(NODE) (TREE_LANG_FLAG_1 (NODE))
                   1050: 
                   1051: /* Nonzero in IDENTIFIER_NODE means that this name is overloaded, and
                   1052:    should be looked up in a non-standard way.  */
                   1053: #define TREE_OVERLOADED(NODE) (TREE_LANG_FLAG_0 (NODE))
                   1054: #define DECL_OVERLOADED(NODE) (DECL_LANG_FLAG_4 (NODE))
                   1055: 
                   1056: /* Nonzero if this (non-TYPE)_DECL has its virtual attribute set.
                   1057:    For a FUNCTION_DECL, this is when the function is a virtual function.
                   1058:    For a VAR_DECL, this is when the variable is a virtual function table.
                   1059:    For a FIELD_DECL, when the field is the field for the virtual function table.
                   1060:    For an IDENTIFIER_NODE, nonzero if any function with this name
                   1061:    has been declared virtual.
                   1062: 
                   1063:    For a _TYPE if it uses virtual functions (or is derived from
                   1064:    one that does).  */
                   1065: #define TYPE_VIRTUAL_P(NODE) (TREE_LANG_FLAG_2 (NODE))
                   1066: 
                   1067: /* Same, but tells if this field is private in current context.  */
                   1068: #define DECL_PRIVATE(NODE) (DECL_LANG_FLAG_5 (NODE))
                   1069: 
                   1070: /* Same, but tells if this field is private in current context.  */
                   1071: #define DECL_PROTECTED(NODE) (DECL_LANG_FLAG_6(NODE))
                   1072: 
                   1073: #define DECL_PUBLIC(NODE) (DECL_LANG_FLAG_7(NODE))
                   1074: 
                   1075: /* Record whether a typedef for type `int' was actually `signed int'.  */
                   1076: #define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))
                   1077: 
1.1.1.2 ! root     1078: /* Mark which labels are explicitly declared.
        !          1079:    These may be shadowed, and may be referenced from nested functions.  */
        !          1080: #define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
        !          1081: 
1.1       root     1082: /* Record whether a type or decl was written with nonconstant size.
                   1083:    Note that TYPE_SIZE may have simplified to a constant.  */
                   1084: #define C_TYPE_VARIABLE_SIZE(type) TREE_LANG_FLAG_4 (type)
                   1085: #define C_DECL_VARIABLE_SIZE(type) DECL_LANG_FLAG_8 (type)
                   1086: 
                   1087: /* Nonzero for _TYPE means that the _TYPE defines
                   1088:    at least one constructor.  */
                   1089: #define TYPE_HAS_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1(NODE))
                   1090: 
                   1091: /* When appearing in an INDIRECT_REF, it means that the tree structure
                   1092:    underneath is actually a call to a constructor.  This is needed
                   1093:    when the constructor must initialize local storage (which can
                   1094:    be automatically destroyed), rather than allowing it to allocate
                   1095:    space from the heap.
                   1096: 
                   1097:    When appearing in a SAVE_EXPR, it means that underneath
                   1098:    is a call to a constructor.
                   1099: 
                   1100:    When appearing in a CONSTRUCTOR, it means that it was
                   1101:    a GNU C constructor expression.
                   1102: 
                   1103:    When appearing in a FIELD_DECL, it means that this field
                   1104:    has been duly initialized in its constructor.  */
                   1105: #define TREE_HAS_CONSTRUCTOR(NODE) (TREE_LANG_FLAG_4(NODE))
                   1106: 
                   1107: /* Indicates that a NON_LVALUE_EXPR came from a C++ reference.
                   1108:    Used to generate more helpful error message in case somebody
                   1109:    tries to take its address.  */
                   1110: #define TREE_REFERENCE_EXPR(NODE) (TREE_LANG_FLAG_3(NODE))
                   1111: 
                   1112: /* Nonzero for _TYPE means that the _TYPE defines a destructor.  */
                   1113: #define TYPE_HAS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_2(NODE))
                   1114: 
                   1115: /* Nonzero for _TYPE node means that creating an object of this type
                   1116:    will involve a call to a constructor.  This can apply to objects
                   1117:    of ARRAY_TYPE if the type of the elements needs a constructor.  */
                   1118: #define TYPE_NEEDS_CONSTRUCTING(NODE) (TYPE_LANG_FLAG_3(NODE))
                   1119: #define TYPE_NEEDS_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.needs_constructor)
                   1120: 
                   1121: /* Nonzero for _TYPE node means that destroying an object of this type
                   1122:    will involve a call to a destructor.  This can apply to objects
                   1123:    of ARRAY_TYPE is the type of the elements needs a destructor.  */
                   1124: #define TYPE_NEEDS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_4(NODE))
                   1125: 
                   1126: /* Nonzero for VAR_DECL node means that `external' was specified in
                   1127:    its declaration.  */
                   1128: #define DECL_EXTERNAL(NODE) (DECL_LANG_FLAG_2(NODE))
                   1129: 
                   1130: /* Nonzero for SAVE_EXPR if used to initialize a PARM_DECL.  */
                   1131: #define PARM_DECL_EXPR(NODE) (TREE_LANG_FLAG_2(NODE))
                   1132: 
                   1133: /* Nonzero in FUNCTION_DECL means it is really an operator.
                   1134:    Just used to communicate formatting information to dbxout.c.  */
                   1135: #define DECL_OPERATOR(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.operator_attr)
                   1136: 
                   1137: /* Define fields and accessors for nodes representing declared names.  */
                   1138: 
                   1139: /* C++: A derived class may be able to directly use the virtual
                   1140:    function table of a base class.  When it does so, it may
                   1141:    still have a decl node used to access the virtual function
                   1142:    table (so that variables of this type can initialize their
                   1143:    virtual function table pointers by name).  When such thievery
1.1.1.2 ! root     1144:    is committed, know exactly which base class's virtual function
1.1       root     1145:    table is the one being stolen.  This effectively computes the
                   1146:    transitive closure.  */
                   1147: #define DECL_VPARENT(NODE) ((NODE)->decl.arguments)
                   1148: 
                   1149: /* Make a slot so we can implement nested types.  This slot holds
                   1150:    the IDENTIFIER_NODE that uniquely names the nested type.  This
                   1151:    is for TYPE_DECLs only.  */
                   1152: #if !PARANOID
                   1153: #define DECL_NESTED_TYPENAME(NODE) ((NODE)->decl.arguments)
                   1154: #else
                   1155: #define DECL_NESTED_TYPENAME(NODE) (*DECL_NESTED_TYPENAME_PTR(NODE))
                   1156: #ifdef __GNUC__
                   1157: __inline
                   1158: #endif
                   1159: static tree * DECL_NESTED_TYPENAME_PTR(NODE) tree NODE; { return
                   1160:   (assert (TREE_CODE_CLASS (TREE_CODE (NODE)) == 'd'),
                   1161:    &(NODE)->decl.arguments) ;}
                   1162: #endif
                   1163: 
                   1164: /* C++: all of these are overloaded!  These apply only to TYPE_DECLs.  */
                   1165: #define DECL_FRIENDLIST(NODE) (DECL_INITIAL (NODE))
                   1166: #define DECL_UNDEFINED_FRIENDS(NODE) ((NODE)->decl.result)
                   1167: #define DECL_WAITING_FRIENDS(NODE) ((tree)(NODE)->decl.rtl)
                   1168: #define SET_DECL_WAITING_FRIENDS(NODE,VALUE) ((NODE)->decl.rtl=(struct rtx_def*)VALUE)
                   1169: 
                   1170: /* The DECL_VISIBILITY is used to record under which context
                   1171:    special visibility rules apply.  */
                   1172: #define DECL_VISIBILITY(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.visibility)
                   1173: 
                   1174: /* C++: all of these are overloaded!
                   1175:    These apply to PARM_DECLs and VAR_DECLs.  */
                   1176: #define DECL_REFERENCE_SLOT(NODE) ((tree)(NODE)->decl.arguments)
                   1177: #define SET_DECL_REFERENCE_SLOT(NODE,VAL) ((NODE)->decl.arguments=VAL)
                   1178: 
                   1179: /* For local VAR_DECLs, holds index into gc-protected obstack.  */
                   1180: #define DECL_GC_OFFSET(NODE) ((NODE)->decl.result)
                   1181: 
                   1182: /* Accessor macros for C++ template decl nodes.  */
                   1183: #define DECL_TEMPLATE_IS_CLASS(NODE)    (DECL_RESULT(NODE) == NULL_TREE)
                   1184: #define DECL_TEMPLATE_PARMS(NODE)       DECL_ARGUMENTS(NODE)
                   1185: /* For class templates.  */
                   1186: #define DECL_TEMPLATE_MEMBERS(NODE)     DECL_INITIAL(NODE)
                   1187: /* For function, method, class-data templates.  */
                   1188: #define DECL_TEMPLATE_RESULT(NODE)      DECL_RESULT(NODE)
                   1189: #define DECL_TEMPLATE_INSTANTIATIONS(NODE) DECL_VINDEX(NODE)
                   1190: 
                   1191: /* ...and for unexpanded-parameterized-type nodes.  */
                   1192: #define UPT_TEMPLATE(NODE)      TREE_PURPOSE(TYPE_VALUES(NODE))
                   1193: #define UPT_PARMS(NODE)         TREE_VALUE(TYPE_VALUES(NODE))
                   1194: 
                   1195: #ifdef SOS
                   1196: #define DECL_DINDEX(NODE) (DECL_LANG_SPECIFIC(NODE)->dynamic_index)
                   1197: #endif
                   1198: 
                   1199: /* An enumeration of the kind of tags that C++ accepts.  */
                   1200: enum tag_types { record_type, class_type, union_type, enum_type, exception_type };
                   1201: 
                   1202: /* Zero means prototype weakly, as in ANSI C (no args means nothing).
                   1203:    Each language context defines how this variable should be set.  */
                   1204: extern int strict_prototype;
                   1205: extern int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus;
                   1206: 
                   1207: /* Non-zero means that if a label exists, and no other identifier
                   1208:    applies, use the value of the label.  */
                   1209: extern int flag_labels_ok;
                   1210: 
                   1211: /* Non-zero means to collect statistics which might be expensive
                   1212:    and to print them when we are done.  */
                   1213: extern int flag_detailed_statistics;
                   1214: 
                   1215: /* Non-zero means warn in function declared in derived class has the
                   1216:    same name as a virtual in the base class, but fails to match the
                   1217:    type signature of any virtual function in the base class.  */
                   1218: extern int warn_overloaded_virtual;
                   1219: 
                   1220: /* in cp-decl{2}.c */
                   1221: extern tree void_list_node;
                   1222: extern tree void_zero_node;
                   1223: extern tree default_function_type;
                   1224: extern tree define_function ();
                   1225: extern tree build_member_type ();
                   1226: extern tree build_push_scope ();
                   1227: 
                   1228: extern tree vtable_entry_type;
                   1229: extern tree __t_desc_type_node, __i_desc_type_node, __m_desc_type_node;
                   1230: extern tree class_star_type_node;
                   1231: extern tree build_vtable_entry ();
                   1232: extern tree build_vfn_ref ();
                   1233: extern tree finish_table ();
                   1234: 
                   1235: extern tree typedecl_for_tag ();
                   1236: extern tree identifier_class_value ();
                   1237: extern tree constructor_name ();
                   1238: 
                   1239: extern int complete_array_type ();
                   1240: extern tree coerce_new_type (), coerce_delete_type ();
                   1241: 
                   1242: /* A node that is a list (length 1) of error_mark_nodes.  */
                   1243: extern tree error_mark_list;
                   1244: 
                   1245: extern tree ptr_type_node;
                   1246: extern tree class_type_node, record_type_node, union_type_node, enum_type_node;
                   1247: extern tree exception_type_node, unknown_type_node;
                   1248: 
                   1249: extern tree get_temp_name (), get_temp_aggr (), get_temp_regvar ();
                   1250: extern tree cleanup_after_call ();
                   1251: extern tree build_type_conversion ();
                   1252: extern tree convert_force ();
                   1253: extern tree maybe_convert_decl_to_const ();
                   1254: extern char *lang_printable_name ();
                   1255: extern char *fndecl_as_string ();
                   1256: extern char *build_overload_name ();
                   1257: 
                   1258: /* The largest size a virtual function table can be.
                   1259:    Must be a (power of 2).  */
                   1260: #ifndef VINDEX_MAX
                   1261: #define VINDEX_MAX ((unsigned)128)
                   1262: /* This is the integer ~ (vindex_max - 1).  */
                   1263: #endif
                   1264: extern tree vtbl_mask;
                   1265: 
                   1266: /* Array type `(void *)[]' */
                   1267: extern tree vtbl_type_node;
                   1268: 
                   1269: extern tree get_parm_types ();
                   1270: extern tree grokopexpr (), getaggrs (), groktypefield ();
                   1271: extern tree grok_method_quals (), grok_enum_decls ();
                   1272: extern void finish_anon_union();
                   1273: extern tree long_long_integer_type_node, long_long_unsigned_type_node;
                   1274: /* For building calls to `delete'.  */
                   1275: extern tree integer_two_node, integer_three_node;
                   1276: extern tree get_first_matching_virtual (), get_abstract_virtuals ();
                   1277: 
                   1278: /* in cp-typeck.c */
                   1279: extern tree build_x_conditional_expr ();
                   1280: extern tree merge_component_comparisons ();
                   1281: extern tree build_x_unary_op (), build_x_binary_op ();
                   1282: extern tree build_component_addr ();
                   1283: extern tree build_x_function_call ();
                   1284: extern tree require_complete_type ();
                   1285: extern tree build_x_indirect_ref (), build_x_array_ref ();
                   1286: extern tree build_x_modify_expr (), build_x_modify_op_expr ();
                   1287: 
                   1288: extern tree build_m_component_ref ();
                   1289: extern tree build_component_type_expr ();
                   1290: extern tree build_x_arrow ();
                   1291: extern tree build_component_ref_1 ();
                   1292: extern tree datatype (), unary_complex_lvalue (), target_type ();
                   1293: extern tree build_return_stmt ();
                   1294: extern tree convert_arguments (), commonparms ();
                   1295: extern tree cplus_size_in_bytes ();
                   1296: extern tree cplus_sizeof (), cplus_sizeof_nowarn ();
                   1297: extern tree error_not_base_type ();
                   1298: 
                   1299: /* in cp-type2.c */
                   1300: extern tree binfo_or_else ();
                   1301: 
                   1302: /* in tree.c */
                   1303: extern tree build_let ();
                   1304: extern tree decl_type_context ();
                   1305: 
                   1306: /* in cp-tree.c */
                   1307: extern tree build1 ();
                   1308: extern tree build_cplus_new ();
                   1309: extern tree build_cplus_array_type ();
                   1310: extern tree build_cplus_method_type ();
                   1311: extern tree build_classtype_variant ();
                   1312: extern tree hash_tree_cons (), hash_tree_chain ();
                   1313: extern tree list_hash_lookup_or_cons ();
                   1314: extern tree layout_basetypes ();
                   1315: extern tree copy_to_permanent ();
                   1316: extern tree get_decl_list ();
                   1317: extern tree break_out_cleanups ();
1.1.1.2 ! root     1318: extern tree array_type_nelts_total ();
        !          1319: extern tree array_type_nelts_top ();
1.1       root     1320: 
                   1321: /* in cp-except.c */
                   1322: extern tree current_exception_type;
                   1323: extern tree current_exception_decl;
                   1324: extern tree current_exception_object;
                   1325: extern tree build_exception_variant ();
                   1326: extern tree lookup_exception_type (), lookup_exception_cname ();
                   1327: extern tree lookup_exception_object ();
                   1328: extern tree cplus_expand_start_catch ();
                   1329: extern tree cplus_expand_end_try ();
                   1330: 
                   1331: /* in cp-class.c */
                   1332: extern tree current_class_name;
                   1333: extern tree current_class_type;
                   1334: 
                   1335: extern tree current_lang_name, lang_name_cplusplus, lang_name_c;
                   1336: 
                   1337: extern tree convert_pointer_to (), convert_pointer_to_vbase ();
                   1338: extern tree convert_to_reference (), convert_to_aggr (), convert_aggr ();
                   1339: extern tree build_x_new (), build_x_delete ();
                   1340: extern tree build_new (), build_vec_new (), build_delete (), build_vec_delete ();
                   1341: extern tree make_destructor_name ();
                   1342: extern tree build_scoped_ref (), build_vfield_ref ();
                   1343: extern tree build_method_call (), build_overload_call ();
                   1344: extern tree build_type_pathname ();
                   1345: extern tree start_method (), start_type_method ();
                   1346: extern tree finish_method ();
                   1347: 
                   1348: extern tree lookup_field (), lookup_fnfields ();
                   1349: 
                   1350: void pushclass (), popclass (), pushclasstype ();
                   1351: extern tree build_operator_fnname (), build_opfncall (), build_type_conversion ();
                   1352: extern tree build_wrapper ();
                   1353: 
                   1354: /* Points to the name of that function. May not be the DECL_NAME
                   1355:    of CURRENT_FUNCTION_DECL due to overloading */
                   1356: extern tree original_function_name;
                   1357: 
                   1358: # define IS_AGGR_TYPE(t) (TYPE_LANG_FLAG_5 (t))
                   1359: 
                   1360: # define IS_AGGR_TYPE_CODE(t) \
                   1361:   (t == RECORD_TYPE || t == UNION_TYPE)
                   1362: 
                   1363: extern tree build_decl_overload (), build_typename_overload ();
                   1364: extern tree build_destructor_call ();
                   1365: extern tree resolve_scope_to_name ();
                   1366: extern tree build_scoped_method_call ();
                   1367: extern tree current_class_name, current_class_type, current_class_decl, C_C_D;
                   1368: extern tree current_vtable_decl;
                   1369: 
                   1370: /* in cp-init.c  */
                   1371: extern tree resolve_offset_ref ();
                   1372: extern void check_base_init ();
                   1373: extern void do_member_init ();
                   1374: extern tree global_base_init_list;
                   1375: extern tree current_base_init_list, current_member_init_list;
                   1376: #ifdef SOS
                   1377: extern tree get_linktable_name (), get_dtable_name (), get_sos_dtable ();
                   1378: #endif
                   1379: extern tree get_member_function ();
                   1380: extern tree build_member_call (), build_offset_ref ();
                   1381: 
                   1382: extern int current_function_assigns_this;
                   1383: extern int current_function_just_assigned_this;
                   1384: extern int current_function_parms_stored;
                   1385: 
                   1386: /* Here's where we control how name mangling takes place.  */
                   1387: 
                   1388: #define OPERATOR_ASSIGN_FORMAT "__a%s"
                   1389: #define OPERATOR_FORMAT "__%s"
                   1390: #define OPERATOR_TYPENAME_FORMAT "__op"
                   1391: 
                   1392: /* Cannot use '$' up front, because this confuses gdb.
                   1393:    Note that any format of this kind *must* make the
1.1.1.2 ! root     1394:    format for `this' lexicographically less than any other
1.1       root     1395:    parameter name, i.e. "$this" is less than anything else can be.
                   1396: 
                   1397:    Note that all forms in which the '$' is significant are long enough
                   1398:    for direct indexing.  */
                   1399: 
                   1400: /* Define NO_DOLLAR_IN_LABEL in your favorite tm file if your assembler
                   1401:    doesn't allow '$' in symbol names.  */
                   1402: #ifndef NO_DOLLAR_IN_LABEL
                   1403: 
                   1404: #define JOINER '$'
                   1405: 
                   1406: #define THIS_NAME "$t"
                   1407: #define VPTR_NAME "$v"
                   1408: #define THROW_NAME "$eh_throw"
                   1409: #define DESTRUCTOR_DECL_PREFIX "_$_"
                   1410: #define WRAPPER_DECL_FORMAT "__W$%s"
                   1411: #define WRAPPER_PRED_DECL_FORMAT "__P$%s"
                   1412: #define ANTI_WRAPPER_DECL_FORMAT "__w$%s"
                   1413: #define IN_CHARGE_NAME "__in$chrg"
                   1414: #define AUTO_VTABLE_NAME "__vtbl$me__"
                   1415: #define AUTO_TEMP_NAME "_$tmp_"
                   1416: #define AUTO_TEMP_FORMAT "_$tmp_%d"
                   1417: #define VTBL_PTR_TYPE "$vtbl_ptr_type"
                   1418: #define VTABLE_NAME_FORMAT "_vt$%s"
                   1419: #define VFIELD_NAME "_vptr$"
                   1420: #define VFIELD_NAME_FORMAT "_vptr$%s"
                   1421: #define VBASE_NAME "_vb$"
                   1422: #define VBASE_NAME_FORMAT "_vb$%s"
                   1423: #define STATIC_NAME_FORMAT "_%s$%s"
                   1424: #define FILE_FUNCTION_FORMAT "_GLOBAL_$D$%s"
                   1425: #define ANON_AGGRNAME_FORMAT "$_%d"
                   1426: 
                   1427: #else  /* NO_DOLLAR_IN_LABEL */
                   1428: 
                   1429: #define JOINER '.'
                   1430: 
                   1431: #define THIS_NAME ".t"
                   1432: #define VPTR_NAME ".v"
                   1433: #define THROW_NAME ".eh_throw"
                   1434: #define DESTRUCTOR_DECL_PREFIX "_._"
                   1435: #define WRAPPER_DECL_FORMAT "__W.%s"
                   1436: #define WRAPPER_PRED_DECL_FORMAT "__P.%s"
                   1437: #define ANTI_WRAPPER_DECL_FORMAT "__w.%s"
                   1438: #define IN_CHARGE_NAME "__in.chrg"
                   1439: #define AUTO_VTABLE_NAME "__vtbl.me__"
                   1440: #define AUTO_TEMP_NAME "_.tmp_"
                   1441: #define AUTO_TEMP_FORMAT "_.tmp_%d"
                   1442: #define VTBL_PTR_TYPE ".vtbl_ptr_type"
                   1443: #define VTABLE_NAME_FORMAT "_vt.%s"
                   1444: #define VFIELD_NAME "_vptr."
                   1445: #define VFIELD_NAME_FORMAT "_vptr.%s"
                   1446: #define VBASE_NAME "_vb."
                   1447: #define VBASE_NAME_FORMAT "_vb.%s"
                   1448: #define STATIC_NAME_FORMAT "_%s.%s"
                   1449: #define FILE_FUNCTION_FORMAT "_GLOBAL_.D.%s"
                   1450: 
                   1451: #define ANON_AGGRNAME_FORMAT "._%d"
                   1452: 
                   1453: #endif /* NO_DOLLAR_IN_LABEL */
                   1454: 
                   1455: #define DESTRUCTOR_NAME_FORMAT "~%s"
                   1456: #define WRAPPER_NAME_FORMAT "()%s"
                   1457: #define WRAPPER_PRED_NAME_FORMAT "()?%s"
                   1458: #define ANTI_WRAPPER_NAME_FORMAT "~()%s"
                   1459: #define FILE_FUNCTION_PREFIX_LEN 9
                   1460: #define VTABLE_DELTA_NAME "delta"
                   1461: #define VTABLE_DELTA2_NAME "delta2"
                   1462: #define VTABLE_INDEX_NAME "index"
                   1463: #define VTABLE_PFN_NAME "pfn"
                   1464: #define EXCEPTION_CLEANUP_NAME "exception cleanup"
                   1465: 
                   1466: #define THIS_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \
                   1467:                              && IDENTIFIER_POINTER (ID_NODE)[1] == 't')
                   1468: #define VPTR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER \
                   1469:                              && IDENTIFIER_POINTER (ID_NODE)[1] == 'v')
                   1470: #define DESTRUCTOR_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == JOINER)
                   1471: 
                   1472: #define WRAPPER_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == '_' \
                   1473:                                 && IDENTIFIER_POINTER (ID_NODE)[2] == 'W' \
                   1474:                                 && IDENTIFIER_POINTER (ID_NODE)[3] == JOINER)
                   1475: #define WRAPPER_PRED_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == '_' \
                   1476:                                 && IDENTIFIER_POINTER (ID_NODE)[2] == 'P' \
                   1477:                                 && IDENTIFIER_POINTER (ID_NODE)[3] == JOINER)
                   1478: #define ANTI_WRAPPER_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[1] == '_' \
                   1479:                                      && IDENTIFIER_POINTER (ID_NODE)[2] == 'w' \
                   1480:                                      && IDENTIFIER_POINTER (ID_NODE)[3] == JOINER)
                   1481: #define WRAPPER_OR_ANTI_WRAPPER_NAME_P(ID_NODE) \
                   1482:   (IDENTIFIER_POINTER (ID_NODE)[1] == '_' \
                   1483:    && (IDENTIFIER_POINTER (ID_NODE)[2]|('W'^'w')) == 'w' \
                   1484:    && IDENTIFIER_POINTER (ID_NODE)[3] == JOINER)
                   1485: 
                   1486: #define VTABLE_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[3] == JOINER \
                   1487:   && IDENTIFIER_POINTER (ID_NODE)[2] == 't'\
                   1488:   && IDENTIFIER_POINTER (ID_NODE)[1] == 'v')
                   1489: 
                   1490: #define VBASE_NAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[3] == JOINER \
                   1491:   && IDENTIFIER_POINTER (ID_NODE)[2] == 'b'\
                   1492:   && IDENTIFIER_POINTER (ID_NODE)[1] == 'v')
                   1493: 
                   1494: #define OPERATOR_TYPENAME_P(ID_NODE) \
                   1495:   (IDENTIFIER_POINTER (ID_NODE)[0] == '_'      \
                   1496:    && IDENTIFIER_POINTER (ID_NODE)[1] == '_'   \
                   1497:    && IDENTIFIER_POINTER (ID_NODE)[2] == 'o'   \
                   1498:    && IDENTIFIER_POINTER (ID_NODE)[3] == 'p')
                   1499: 
                   1500: #define TEMP_NAME_P(ID_NODE) (!strncmp (IDENTIFIER_POINTER (ID_NODE), AUTO_TEMP_NAME, sizeof (AUTO_TEMP_NAME)-1))
                   1501: #define VFIELD_NAME_P(ID_NODE) (!strncmp (IDENTIFIER_POINTER (ID_NODE), VFIELD_NAME, sizeof(VFIELD_NAME)-1))
                   1502: 
                   1503: /* For anonymous aggregate types, we need some sort of name to
                   1504:    hold on to.  In practice, this should not appear, but it should
                   1505:    not be harmful if it does.  */
                   1506: #define ANON_AGGRNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == JOINER)
                   1507: #define ANON_PARMNAME_FORMAT "_%d"
                   1508: #define ANON_PARMNAME_P(ID_NODE) (IDENTIFIER_POINTER (ID_NODE)[0] == '_' \
                   1509:                                  && IDENTIFIER_POINTER (ID_NODE)[1] <= '9')
                   1510: 
                   1511: /* Define the sets of attributes that member functions and baseclasses
                   1512:    can have.  These are sensible combinations of {public,private,protected}
                   1513:    cross {virtual,non-virtual}.  */
                   1514: 
                   1515: enum visibility_type {
                   1516:   visibility_default,
                   1517:   visibility_public,
                   1518:   visibility_private,
                   1519:   visibility_protected,
                   1520:   visibility_default_virtual,
                   1521:   visibility_public_virtual,
                   1522:   visibility_private_virtual
                   1523: };
                   1524: 
                   1525: enum visibility_type compute_visibility ();
                   1526: 
                   1527: /* in cp-lex.c  */
                   1528: extern tree current_unit_name, current_unit_language;
                   1529: extern char *operator_name_string ();
                   1530: 
                   1531: /* Things for handling inline functions.  */
                   1532: 
                   1533: struct pending_inline
                   1534: {
                   1535:   struct pending_inline *next; /* pointer to next in chain */
                   1536:   int lineno;                  /* line number we got the text from */
                   1537:   char *filename;              /* name of file we were processing */
                   1538:   tree fndecl;                 /* FUNCTION_DECL that brought us here */
                   1539:   int token;                   /* token we were scanning */
                   1540:   int token_value;             /* value of token we were scanning (YYSTYPE) */
                   1541: 
                   1542:   char *buf;                   /* pointer to character stream */
                   1543:   int len;                     /* length of stream */
                   1544:   tree parm_vec, bindings;     /* in case this is derived from a template */
                   1545:   unsigned int can_free : 1;   /* free this after we're done with it? */
                   1546:   unsigned int deja_vu : 1;    /* set iff we don't want to see it again.  */
                   1547: };
                   1548: 
                   1549: extern tree combine_strings ();
                   1550: extern int yylex ();
                   1551: 
                   1552: /* in cp-method.c */
                   1553: extern tree wrapper_name, wrapper_pred_name, anti_wrapper_name;
                   1554: extern struct pending_inline *pending_inlines;
                   1555: extern char *print_fndecl_with_types ();
                   1556: extern tree hack_identifier ();
                   1557: extern tree hack_operator (), hack_wrapper ();
                   1558: 
                   1559: /* 1 for -fall-virtual: make every member function (except
                   1560:    constructors) lay down in the virtual function table.
                   1561:    Calls can then either go through the virtual function table or not,
                   1562:    depending on whether we know what function will actually be called.
                   1563: 
                   1564:    2 for -fSOS: make every member function (including constructors)
                   1565:    lay down in the virtual function table.  All calls go through the
                   1566:    virtual function table: this takes the place of using a linker.  */
                   1567: 
                   1568: extern int flag_all_virtual;
                   1569: 
1.1.1.2 ! root     1570: /* Positive values means that we cannot make optimizing assumptions about
        !          1571:    `this'.  Negative values means we know `this' to be of static type.  */
1.1       root     1572: 
                   1573: extern int flag_this_is_variable;
                   1574: 
                   1575: /* Nonzero means layout structures so that we can do garbage collection.  */
                   1576: 
                   1577: extern int flag_gc;
                   1578: 
                   1579: /* Nonzero means generate 'dossiers' that give run-time type information.  */
                   1580: 
                   1581: extern int flag_dossier;
                   1582: 
                   1583: /* Current end of entries in the gc obstack for stack pointer variables.  */
                   1584: 
                   1585: extern int current_function_obstack_index;
                   1586: 
                   1587: /* Flag saying whether we have used the obstack in this function or not.  */
                   1588: 
                   1589: extern int current_function_obstack_usage;
                   1590: 
                   1591: enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG, WRAPPER_FLAG, WRAPPER_PRED_FLAG, ANTI_WRAPPER_FLAG };
                   1592: 
                   1593: extern tree default_conversion (), pushdecl (), pushdecl_top_level ();
                   1594: extern tree push_overloaded_decl ();
                   1595: extern void push_overloaded_decl_top_level ();
                   1596: extern tree make_instance_name (), do_decl_overload ();
                   1597: extern tree maybe_build_cleanup ();
                   1598: extern tree build_instantiated_decl (), instantiate_type ();
                   1599: extern tree require_instantiated_type ();
                   1600: extern tree build_vtbl_ref ();
                   1601: extern tree make_anon_parm_name ();
                   1602: extern int resolves_to_fixed_type_p ();
                   1603: 
                   1604: extern tree do_friend ();
                   1605: extern void grokclassfn ();
                   1606: 
                   1607: extern tree current_class_decl, C_C_D; /* PARM_DECL: the class instance variable */
                   1608: 
                   1609: /* The following two can be derived from the previous one */
                   1610: extern tree current_class_name;        /* IDENTIFIER_NODE: name of current class */
                   1611: extern tree current_class_type;        /* _TYPE: the type of the current class */
                   1612: 
                   1613: /* Some macros for char-based bitfields.  */
                   1614: #define B_SET(a,x) (a[x>>3] |= (1 << (x&7)))
                   1615: #define B_CLR(a,x) (a[x>>3] &= ~(1 << (x&7)))
                   1616: #define B_TST(a,x) (a[x>>3] & (1 << (x&7)))
                   1617: 
                   1618: /* These are uses as bits in flags passed to build_method_call
                   1619:    to control its error reporting behavior.
                   1620: 
                   1621:    LOOKUP_PROTECT means flag visibility violations.
                   1622:    LOOKUP_COMPLAIN mean complain if no suitable member function
                   1623:      matching the arguments is found.
                   1624:    LOOKUP_NORMAL is just a combination of these two.
                   1625:    LOOKUP_AGGR requires the instance to be of aggregate type.
                   1626:    LOOKUP_NONVIRTUAL means make a direct call to the member function found
                   1627:    LOOKUP_GLOBAL means search through the space of overloaded functions,
                   1628:      rather than the space of member functions.
                   1629:    LOOKUP_HAS_IN_CHARGE means that the "in charge" variable is already
                   1630:      in the parameter list.
                   1631:    LOOKUP_PROTECTED_OK means that even if the constructor we find appears
1.1.1.2 ! root     1632:      to be non-visible to current scope, call it anyway.
1.1       root     1633:    LOOKUP_DYNAMIC means call dynamic functions, a la SOS.
                   1634:    LOOKUP_NO_CONVERSION means that user-defined conversions are not
                   1635:      permitted.  Built-in conversions are permitted.
                   1636:    LOOKUP_DESTRUCTOR means explicit call to destructor.  */
                   1637: 
                   1638: #define LOOKUP_PROTECT (1)
                   1639: #define LOOKUP_COMPLAIN (2)
                   1640: #define LOOKUP_NORMAL (3)
                   1641: #define LOOKUP_AGGR (4)
                   1642: #define LOOKUP_NONVIRTUAL (8)
                   1643: #define LOOKUP_GLOBAL (16)
                   1644: #define LOOKUP_HAS_IN_CHARGE (32)
                   1645: #define LOOKUP_SPECULATIVELY (64)
                   1646: #define LOOKUP_PROTECTED_OK (128)
                   1647: #define LOOKUP_DYNAMIC (256)
                   1648: #define LOOKUP_NO_CONVERSION (512)
                   1649: #define LOOKUP_DESTRUCTOR (512)
                   1650: 
                   1651: /* Anatomy of a DECL_FRIENDLIST (which is a TREE_LIST):
                   1652:    purpose = friend name (IDENTIFIER_NODE);
                   1653:    value = TREE_LIST of FUNCTION_DECLS;
                   1654:    chain, type = EMPTY;  */
                   1655: #define FRIEND_NAME(LIST) (TREE_PURPOSE (LIST))
                   1656: #define FRIEND_DECLS(LIST) (TREE_VALUE (LIST))
                   1657: 
                   1658: extern tree get_temp_name (), get_temp_aggr (), get_temp_regvar ();
                   1659: extern tree get_decl_list ();
                   1660: extern tree build_method_call ();
                   1661: extern tree build_type_conversion ();
                   1662: extern tree build_functional_cast ();
                   1663: extern tree decl_constant_value ();
                   1664: 
                   1665: /* These macros are for accessing the fields of TEMPLATE...PARM nodes.  */
                   1666: #define TEMPLATE_TYPE_TPARMLIST(NODE) TREE_PURPOSE (TYPE_FIELDS (NODE))
                   1667: #define TEMPLATE_TYPE_IDX(NODE) TREE_INT_CST_LOW (TREE_VALUE (TYPE_FIELDS (NODE)))
                   1668: #define TEMPLATE_TYPE_SET_INFO(NODE,P,I) \
                   1669:   (TYPE_FIELDS (NODE) = build_tree_list (P, build_int_2 (I, 0)))
                   1670: #define TEMPLATE_CONST_TPARMLIST(NODE) (*(tree*)&TREE_INT_CST_LOW(NODE))
                   1671: #define TEMPLATE_CONST_IDX(NODE) (TREE_INT_CST_HIGH(NODE))
                   1672: #define TEMPLATE_CONST_SET_INFO(NODE,P,I) \
                   1673:   (TEMPLATE_CONST_TPARMLIST (NODE) = saved_parmlist, \
                   1674:    TEMPLATE_CONST_IDX (NODE) = I)
                   1675: 
                   1676: /* in cp-init.c */
                   1677: extern tree resolve_offset_ref ();
                   1678: 
                   1679: /* in cp-lex.c  */
                   1680: extern char *operator_name_string ();
                   1681: 
                   1682: extern tree build_opid ();
                   1683: extern tree do_identifier ();
                   1684: extern tree arbitrate_lookup ();
                   1685: 
                   1686: /* Indexed by TREE_CODE, these tables give C-looking names to
                   1687:    operators represented by TREE_CODES.  For example,
                   1688:    opname_tab[(int) MINUS_EXPR] == "-".  */
                   1689: extern char **opname_tab, **assignop_tab;
                   1690: 
                   1691: extern tree build_lang_decl (), build_lang_field_decl ();
                   1692: extern tree make_lang_type ();
                   1693: extern tree cons_up_default_function ();
                   1694: 
                   1695: /* in cp-convert.c  */
                   1696: extern tree convert_from_reference ();
                   1697: 
                   1698: /* in cp-search.c  */
                   1699: extern tree init_vbase_pointers ();
                   1700: extern tree build_vbase_pointer (), build_vbase_path ();
                   1701: extern tree lookup_fnfield (), next_baselink ();
                   1702: 
                   1703: extern tree get_binfo ();
                   1704: extern tree get_vbase_types ();
                   1705: extern tree get_baselinks ();
                   1706: extern tree get_wrapper ();
                   1707: extern tree make_binfo (), copy_binfo ();
                   1708: extern tree binfo_value (), virtual_member ();
                   1709: extern tree virtual_offset ();
                   1710: extern tree reverse_path ();
                   1711: 
                   1712: /* in cp-gc.c  */
                   1713: tree protect_value_from_gc ();
                   1714: tree build_headof ();
                   1715: tree build_classof ();
                   1716: tree build_t_desc ();
                   1717: tree build_i_desc ();
                   1718: tree build_m_desc ();
                   1719: 
                   1720: /* in cp-template.c  */
                   1721: /* PARM_VEC is a vector of template parameters, either IDENTIFIER_NODEs or
                   1722:    PARM_DECLs.  BINDINGS, if non-null, is a vector of bindings for those
                   1723:    parameters.  */
                   1724: struct template_info {
                   1725:   /* Vector of template parameters, either PARM_DECLs or IDENTIFIER_NODEs.  */
                   1726:   tree parm_vec;
                   1727:   /* If non-null, a vector of bindings for the template parms.  */
                   1728:   tree bindings;
                   1729: 
                   1730:   /* Text of template, and length.  */
                   1731:   char *text;
                   1732:   int length;
                   1733:   /* Where it came from.  */
                   1734:   char *filename;
                   1735:   int lineno;
                   1736: 
                   1737:   /* What kind of aggregate -- struct, class, or null.  */
                   1738:   tree aggr;
                   1739: };
                   1740: 
                   1741: extern tree end_template_parm_list ();
                   1742: extern tree process_template_parm ();
                   1743: extern tree lookup_template_class ();
                   1744: extern tree instantiate_template ();
                   1745: extern tree instantiate_class_template ();
                   1746: extern int processing_template_decl, processing_template_defn;
                   1747: 
                   1748: #define PRINT_LANG_DECL
                   1749: #define PRINT_LANG_TYPE
                   1750: 
                   1751: #define UNKNOWN_TYPE LANG_TYPE
                   1752: 
                   1753: /* -- end of C++ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.