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