📄 cp-tree.h
字号:
/* Indicates that a NON_LVALUE_EXPR came from a C++ reference. Used to generate more helpful error message in case somebody tries to take its address. */#define TREE_REFERENCE_EXPR(NODE) (TREE_LANG_FLAG_3(NODE))/* Nonzero for _TYPE means that the _TYPE defines a destructor. */#define TYPE_HAS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_2(NODE))#if 0/* Nonzero for _TYPE node means that creating an object of this type will involve a call to a constructor. This can apply to objects of ARRAY_TYPE if the type of the elements needs a constructor. */#define TYPE_NEEDS_CONSTRUCTING(NODE) (TYPE_LANG_FLAG_3(NODE))#endif/* Nonzero means that an object of this type can not be initialized using an initializer list. */#define CLASSTYPE_NON_AGGREGATE(NODE) \ (TYPE_LANG_SPECIFIC (NODE)->type_flags.non_aggregate)#define TYPE_NON_AGGREGATE_CLASS(NODE) \ (IS_AGGR_TYPE (NODE) && CLASSTYPE_NON_AGGREGATE (NODE))/* Nonzero if there is a user-defined X::op=(x&) for this class. */#define TYPE_HAS_REAL_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_real_assign_ref)#define TYPE_HAS_COMPLEX_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_complex_assign_ref)#define TYPE_HAS_ABSTRACT_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_abstract_assign_ref)#define TYPE_HAS_COMPLEX_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.has_complex_init_ref)/* Nonzero for _TYPE node means that destroying an object of this type will involve a call to a destructor. This can apply to objects of ARRAY_TYPE is the type of the elements needs a destructor. */#define TYPE_NEEDS_DESTRUCTOR(NODE) (TYPE_LANG_FLAG_4(NODE))/* Nonzero for class type means that initialization of this type can use a bitwise copy. */#define TYPE_HAS_TRIVIAL_INIT_REF(NODE) \ (TYPE_HAS_INIT_REF (NODE) && ! TYPE_HAS_COMPLEX_INIT_REF (NODE))/* Nonzero for class type means that assignment of this type can use a bitwise copy. */#define TYPE_HAS_TRIVIAL_ASSIGN_REF(NODE) \ (TYPE_HAS_ASSIGN_REF (NODE) && ! TYPE_HAS_COMPLEX_ASSIGN_REF (NODE))/* Nonzero for _TYPE node means that this type is a pointer to member function type. */#define TYPE_PTRMEMFUNC_P(NODE) (TREE_CODE(NODE) == RECORD_TYPE && TYPE_LANG_SPECIFIC(NODE)->type_flags.ptrmemfunc_flag)#define TYPE_PTRMEMFUNC_FLAG(NODE) (TYPE_LANG_SPECIFIC(NODE)->type_flags.ptrmemfunc_flag)/* Get the POINTER_TYPE to the METHOD_TYPE associated with this pointer to member function. TYPE_PTRMEMFUNC_P _must_ be true, before using this macro. */#define TYPE_PTRMEMFUNC_FN_TYPE(NODE) (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (TREE_CHAIN (TREE_CHAIN (TYPE_FIELDS (NODE)))))))/* These are use to manipulate the the canonical RECORD_TYPE from the hashed POINTER_TYPE, and can only be used on the POINTER_TYPE. */#define TYPE_GET_PTRMEMFUNC_TYPE(NODE) ((tree)TYPE_LANG_SPECIFIC(NODE))#define TYPE_SET_PTRMEMFUNC_TYPE(NODE, VALUE) (TYPE_LANG_SPECIFIC(NODE) = ((struct lang_type *)(void*)(VALUE)))/* These are to get the delta2 and pfn fields from a TYPE_PTRMEMFUNC_P. */#define DELTA2_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, 0, 0), delta2_identifier, 0, 0))#define PFN_FROM_PTRMEMFUNC(NODE) (build_component_ref (build_component_ref ((NODE), pfn_or_delta2_identifier, 0, 0), pfn_identifier, 0, 0))/* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was specified in its declaration. */#define DECL_THIS_EXTERN(NODE) (DECL_LANG_FLAG_2(NODE))/* Nonzero for VAR_DECL and FUNCTION_DECL node means that `static' was specified in its declaration. */#define DECL_THIS_STATIC(NODE) (DECL_LANG_FLAG_6(NODE))/* Nonzero for SAVE_EXPR if used to initialize a PARM_DECL. */#define PARM_DECL_EXPR(NODE) (TREE_LANG_FLAG_2(NODE))/* Nonzero in FUNCTION_DECL means it is really an operator. Just used to communicate formatting information to dbxout.c. */#define DECL_OPERATOR(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.operator_attr)#define ANON_UNION_P(NODE) (DECL_NAME (NODE) == 0)#define UNKNOWN_TYPE LANG_TYPE/* Define fields and accessors for nodes representing declared names. */#if 0/* C++: A derived class may be able to directly use the virtual function table of a base class. When it does so, it may still have a decl node used to access the virtual function table (so that variables of this type can initialize their virtual function table pointers by name). When such thievery is committed, know exactly which base class's virtual function table is the one being stolen. This effectively computes the transitive closure. */#define DECL_VPARENT(NODE) ((NODE)->decl.arguments)#endif/* Make a slot so we can implement nested types. This slot holds the IDENTIFIER_NODE that uniquely names the nested type. This is for TYPE_DECLs only. */#define DECL_NESTED_TYPENAME(NODE) ((NODE)->decl.arguments)#define TYPE_NESTED_NAME(NODE) (DECL_NESTED_TYPENAME (TYPE_NAME (NODE)))#define TYPE_WAS_ANONYMOUS(NODE) (TYPE_LANG_SPECIFIC (NODE)->type_flags.was_anonymous)/* C++: all of these are overloaded! These apply only to TYPE_DECLs. */#define DECL_FRIENDLIST(NODE) (DECL_INITIAL (NODE))#if 0#define DECL_UNDEFINED_FRIENDS(NODE) ((NODE)->decl.result)#endif#define DECL_WAITING_FRIENDS(NODE) ((tree)(NODE)->decl.rtl)#define SET_DECL_WAITING_FRIENDS(NODE,VALUE) \ ((NODE)->decl.rtl=(struct rtx_def*)VALUE)/* The DECL_ACCESS is used to record under which context special access rules apply. */#define DECL_ACCESS(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.access)/* C++: all of these are overloaded! These apply to PARM_DECLs and VAR_DECLs. */#define DECL_REFERENCE_SLOT(NODE) ((tree)(NODE)->decl.arguments)#define SET_DECL_REFERENCE_SLOT(NODE,VAL) ((NODE)->decl.arguments=VAL)/* For local VAR_DECLs, holds index into gc-protected obstack. */#define DECL_GC_OFFSET(NODE) ((NODE)->decl.result)/* Accessor macros for C++ template decl nodes. */#define DECL_TEMPLATE_IS_CLASS(NODE) (DECL_RESULT(NODE) == NULL_TREE)#define DECL_TEMPLATE_PARMS(NODE) DECL_ARGUMENTS(NODE)/* For class templates. */#define DECL_TEMPLATE_MEMBERS(NODE) DECL_SIZE(NODE)/* For function, method, class-data templates. */#define DECL_TEMPLATE_RESULT(NODE) DECL_RESULT(NODE)#define DECL_TEMPLATE_INSTANTIATIONS(NODE) DECL_VINDEX(NODE)/* Indicates whether or not (and how) a template was expanded for this FUNCTION_DECL or VAR_DECL. 0=normal declaration, e.g. int min (int, int); 1=implicit template instantiation 2=explicit template specialization, e.g. int min<int> (int, int); 3=explicit template instantiation, e.g. template int min<int> (int, int); */#define DECL_USE_TEMPLATE(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.use_template)#define DECL_TEMPLATE_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) & 1)#define CLASSTYPE_TEMPLATE_INSTANTIATION(NODE) \ (CLASSTYPE_USE_TEMPLATE (NODE) & 1)#define DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) == 2)#define SET_DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) = 2)#define CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \ (CLASSTYPE_USE_TEMPLATE (NODE) == 2)#define SET_CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \ (CLASSTYPE_USE_TEMPLATE (NODE) = 2)#define DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 1)#define SET_DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 1)#define CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \ (CLASSTYPE_USE_TEMPLATE(NODE) == 1)#define SET_CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \ (CLASSTYPE_USE_TEMPLATE(NODE) = 1)#define DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 3)#define SET_DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 3)#define CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \ (CLASSTYPE_USE_TEMPLATE(NODE) == 3)#define SET_CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \ (CLASSTYPE_USE_TEMPLATE(NODE) = 3)/* We know what we're doing with this decl now. */#define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE)/* This decl was declared or deduced to have internal linkage. This is only meaningful if TREE_PUBLIC is set. */#define DECL_C_STATIC(NODE) \ (DECL_LANG_SPECIFIC (NODE)->decl_flags.c_static)/* This function was declared inline. This flag controls the linkage semantics of 'inline'; whether or not the function is inlined is controlled by DECL_INLINE. */#define DECL_THIS_INLINE(NODE) \ (DECL_LANG_SPECIFIC (NODE)->decl_flags.declared_inline)/* DECL_EXTERNAL must be set on a decl until the decl is actually emitted, so that assemble_external will work properly. So we have this flag to tell us whether the decl is really not external. */#define DECL_NOT_REALLY_EXTERN(NODE) \ (DECL_LANG_SPECIFIC (NODE)->decl_flags.not_really_extern)#define DECL_PUBLIC(NODE) \ (TREE_CODE (NODE) == FUNCTION_DECL \ ? ! DECL_C_STATIC (NODE) : TREE_PUBLIC (NODE))#define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i)/* ...and for unexpanded-parameterized-type nodes. */#define UPT_TEMPLATE(NODE) TREE_PURPOSE(TYPE_VALUES(NODE))#define UPT_PARMS(NODE) TREE_VALUE(TYPE_VALUES(NODE))/* An enumeration of the kind of tags that C++ accepts. */enum tag_types { record_type, class_type, union_type, enum_type, signature_type };/* Zero means prototype weakly, as in ANSI C (no args means nothing). Each language context defines how this variable should be set. */extern int strict_prototype;extern int strict_prototypes_lang_c, strict_prototypes_lang_cplusplus;/* Non-zero means that if a label exists, and no other identifier applies, use the value of the label. */extern int flag_labels_ok;/* Non-zero means to collect statistics which might be expensive and to print them when we are done. */extern int flag_detailed_statistics;/* Non-zero means warn in function declared in derived class has the same name as a virtual in the base class, but fails to match the type signature of any virtual function in the base class. */extern int warn_overloaded_virtual;/* in c-common.c */extern void declare_function_name PROTO((void));extern void decl_attributes PROTO((tree, tree, tree));extern void init_function_format_info PROTO((void));extern void record_function_format PROTO((tree, tree, int, int, int));extern void check_function_format PROTO((tree, tree, tree));/* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */extern void binary_op_error PROTO((enum tree_code));extern tree cp_build_type_variant PROTO((tree, int, int));extern void c_expand_expr_stmt PROTO((tree));/* Validate the expression after `case' and apply default promotions. */extern tree check_case_value PROTO((tree));/* Concatenate a list of STRING_CST nodes into one STRING_CST. */extern tree combine_strings PROTO((tree));extern void constant_expression_warning PROTO((tree));extern tree convert_and_check PROTO((tree, tree));extern void overflow_warning PROTO((tree));extern void unsigned_conversion_warning PROTO((tree, tree));/* Read the rest of the current #-directive line. */extern char *get_directive_line STDIO_PROTO((FILE *));/* Subroutine of build_binary_op, used for comparison operations. See if the operands have both been converted from subword integer types and, if so, perhaps change them both back to their original type. */extern tree shorten_compare PROTO((tree *, tree *, tree *, enum tree_code *));/* Prepare expr to be an argument of a TRUTH_NOT_EXPR, or validate its data type for an `if' or `while' statement or ?..: exp. */extern tree truthvalue_conversion PROTO((tree));extern tree type_for_mode PROTO((enum machine_mode, int));extern tree type_for_size PROTO((unsigned, int));/* in decl{2}.c */extern tree void_list_node;extern tree void_zero_node;extern tree default_function_type;extern tree vtable_entry_type;extern tree sigtable_entry_type;extern tree __t_desc_type_node;extern tree __tp_desc_type_node;extern tree __access_mode_type_node;extern tree __bltn_desc_type_node, __user_desc_type_node;extern tree __class_desc_type_node, __attr_desc_type_node;extern tree __ptr_desc_type_node, __func_desc_type_node;extern tree __ptmf_desc_type_node, __ptmd_desc_type_node;extern tree type_info_type_node;extern tree class_star_type_node;extern tree this_identifier;extern tree pfn_identifier;extern tree index_identifier;extern tree delta_identifier;extern tree delta2_identifier;extern tree pfn_or_delta2_identifier;extern tree tag_identifier;extern tree vb_off_identifier;extern tree vt_off_identifier;/* A node that is a list (length 1) of error_mark_nodes. */extern tree error_mark_list;extern tree ptr_type_node, const_ptr_type_node;extern tree class_type_node, record_type_node, union_type_node, enum_type_node;extern tree unknown_type_node;extern tree opaque_type_node, signature_type_node;/* Node for "pointer to (virtual) function". This may be distinct from ptr_type_node so gdb can distinguish them. */#define vfunc_ptr_type_node \ (flag_vtable_thunks ? vtable_entry_type : ptr_type_node)/* Array type `(void *)[]' */extern tree vtbl_type_node;extern tree delta_type_node;extern tree long_long_integer_type_node, long_long_unsigned_type_node;/* For building calls to `delete'. */extern tree integer_two_node, integer_three_node;extern tree boolean_type_node, boolean_true_node, boolean_false_node;/* in pt.c *//* PARM_VEC is a vector of template parameters, either IDENTIFIER_NODEs or PARM_DECLs. BINDINGS, if non-null, is a vector of bindings for those parameters. */struct template_info { /* Vector of template parameters, either PARM_DECLs or IDENTIFIER_NODEs. */ tree parm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -