⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gxxint.texi

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
DECL_CONTEXT (B::f) == ADECL_CLASS_CONTEXT (B::f) == B@end exampleHas values of:	RECORD_TYPEs, or UNION_TYPEsWhat things can this be used on:	TYPE_DECLs, _DECLs@item DECL_CONTEXTIdentifies the context that the _DECL was found in.  Can be used onvirtual function tables to find the type associated with the virtualfunction table, but since they are FIELD_DECLs, DECL_FIELD_CONTEXT is abetter access method.  Internally the same as DECL_FIELD_CONTEXT, sodon't us both.  See also DECL_FIELD_CONTEXT, DECL_FCONTEXT andDECL_CLASS_CONTEXT.Has values of:	RECORD_TYPEsWhat things can this be used on:@displayVAR_DECLs that are virtual function tables_DECLs@end display@item DECL_FIELD_CONTEXTIdentifies the context that the FIELD_DECL was found in.  Internally thesame as DECL_CONTEXT, so don't us both.  See also DECL_CONTEXT,DECL_FCONTEXT and DECL_CLASS_CONTEXT.Has values of:	RECORD_TYPEsWhat things can this be used on:@displayFIELD_DECLs that are virtual function pointersFIELD_DECLs@end display@item DECL_NAMEHas values of:@display0 for things that don't have namesIDENTIFIER_NODEs for TYPE_DECLs@end display@item DECL_IGNORED_PA bit that can be set to inform the debug information output routines inthe back-end that a certain _DECL node should be totally ignored.Used in cases where it is known that the debugging information will beoutput in another file, or where a sub-type is known not to be neededbecause the enclosing type is not needed.A compiler constructed virtual destructor in derived classes that do notdefine an explicit destructor that was defined explicit in a base classhas this bit set as well.  Also used on __FUNCTION__ and__PRETTY_FUNCTION__ to mark they are ``compiler generated.''  c-decl andc-lex.c both want DECL_IGNORED_P set for ``internally generated vars,''and ``user-invisible variable.''Functions built by the C++ front-end such as default destructors,virtual destructors and default constructors want to be marked thatthey are compiler generated, but unsure why.Currently, it is used in an absolute way in the C++ front-end, as anoptimization, to tell the debug information output routines to notgenerate debugging information that will be output by another separatelycompiled file.@item DECL_VIRTUAL_PA flag used on FIELD_DECLs and VAR_DECLs.  (Documentation in tree.h iswrong.)  Used in VAR_DECLs to indicate that the variable is a vtable.It is also used in FIELD_DECLs for vtable pointers.What things can this be used on:	FIELD_DECLs and VAR_DECLs@item DECL_VPARENTUsed to point to the parent type of the vtable if there is one, else itis just the type associated with the vtable.  Because of the sharing ofvirtual function tables that goes on, this slot is not very useful, andis in fact, not used in the compiler at all.  It can be removed.What things can this be used on:	VAR_DECLs that are virtual function tablesHas values of:	RECORD_TYPEs maybe UNION_TYPEs@item DECL_FCONTEXTUsed to find the first baseclass in which this FIELD_DECL is defined.See also DECL_CONTEXT, DECL_FIELD_CONTEXT and DECL_CLASS_CONTEXT.How it is used:	Used when writing out debugging information about vfield and	vbase decls.What things can this be used on:	FIELD_DECLs that are virtual function pointers	FIELD_DECLs@item DECL_REFERENCE_SLOTUsed to hold the initialize for the reference.What things can this be used on:	PARM_DECLs and VAR_DECLs that have a reference type@item DECL_VINDEXUsed for FUNCTION_DECLs in two different ways.  Before the structurecontaining the FUNCTION_DECL is laid out, DECL_VINDEX may point to aFUNCTION_DECL in a base class which is the FUNCTION_DECL which thisFUNCTION_DECL will replace as a virtual function.  When the class islaid out, this pointer is changed to an INTEGER_CST node which issuitable to find an index into the virtual function table.  Seeget_vtable_entry as to how one can find the right index into the virtualfunction table.  The first index 0, of a virtual function table it notused in the normal way, so the first real index is 1.DECL_VINDEX may be a TREE_LIST, that would seem to be a list ofoverridden FUNCTION_DECLs.  add_virtual_function has code to deal withthis when it uses the variable base_fndecl_list, but it would seem thatsomehow, it is possible for the TREE_LIST to pursist until method_call,and it should not.What things can this be used on:	FUNCTION_DECLs@item DECL_SOURCE_FILEIdentifies what source file a particular declaration was found in.Has values of:	"<built-in>" on TYPE_DECLs to mean the typedef is built in@item DECL_SOURCE_LINEIdentifies what source line number in the source file the declarationwas found at.Has values of:@display0 for an undefined label0 for TYPE_DECLs that are internally generated0 for FUNCTION_DECLs for functions generated by the compiler	(not yet, but should be)0 for ``magic'' arguments to functions, that the user has no	control over@end display@item TREE_USEDHas values of:	0 for unused labels@item TREE_ADDRESSABLEA flag that is set for any type that has a constructor.@item TREE_COMPLEXITYThey seem a kludge way to track recursion, poping, and pushing.  They onlyappear in cp-decl.c and cp-decl2.c, so the are a good candidate forproper fixing, and removal.@item TREE_HAS_CONSTRUCTORA flag to indicate when a CALL_EXPR represents a call to a constructor.If set, we know that the type of the object, is the complete type of theobject, and that the value returned is nonnull.  When used in thisfashion, it is an optimization.  Can also be used on SAVE_EXPRs toindicate when they are of fixed type and nonnull.  Can also be used onINDIRECT_EXPRs on CALL_EXPRs that represent a call to a constructor.@item TREE_PRIVATESet for FIELD_DECLs by finish_struct.  But not uniformly set.The following routines do something with PRIVATE access:build_method_call, alter_access, finish_struct_methods,finish_struct, convert_to_aggr, CWriteLanguageDecl, CWriteLanguageType,CWriteUseObject, compute_access, lookup_field, dfs_pushdecl,GNU_xref_member, dbxout_type_fields, dbxout_type_method_1@item TREE_PROTECTEDThe following routines do something with PROTECTED access:build_method_call, alter_access, finish_struct, convert_to_aggr,CWriteLanguageDecl, CWriteLanguageType, CWriteUseObject,compute_access, lookup_field, GNU_xref_member, dbxout_type_fields,dbxout_type_method_1@item TYPE_BINFOUsed to get the binfo for the type.Has values of:	TREE_VECs that are binfosWhat things can this be used on:	RECORD_TYPEs@item TYPE_BINFO_BASETYPESSee also BINFO_BASETYPES.@item TYPE_BINFO_VIRTUALSA unique list of functions for the virtual function table.  See alsoBINFO_VIRTUALS.What things can this be used on:	RECORD_TYPEs@item TYPE_BINFO_VTABLEPoints to the virtual function table associated with the given type.See also BINFO_VTABLE.What things can this be used on:	RECORD_TYPEsHas values of:	VAR_DECLs that are virtual function tables@item TYPE_NAMENames the type.Has values of:@display0 for things that don't have names.should be IDENTIFIER_NODE for RECORD_TYPEs UNION_TYPEs and         ENUM_TYPEs.TYPE_DECL for RECORD_TYPEs, UNION_TYPEs and ENUM_TYPEs, but         shouldn't be.TYPE_DECL for typedefs, unsure why.@end displayWhat things can one use this on:@displayTYPE_DECLsRECORD_TYPEsUNION_TYPEsENUM_TYPEs@end displayHistory:	It currently points to the TYPE_DECL for RECORD_TYPEs,	UNION_TYPEs and ENUM_TYPEs, but it should be history soon.@item TYPE_METHODSSynonym for @code{CLASSTYPE_METHOD_VEC}.  Chained together with@code{TREE_CHAIN}.  @file{dbxout.c} uses this to get at the methods of aclass.@item TYPE_DECLUsed to represent typedefs, and used to represent bindings layers.Components:	DECL_NAME is the name of the typedef.  For example, foo would	be found in the DECL_NAME slot when @code{typedef int foo;} is	seen.	DECL_SOURCE_LINE identifies what source line number in the	source file the declaration was found at.  A value of 0	indicates that this TYPE_DECL is just an internal binding layer	marker, and does not correspond to a user supplied typedef.	DECL_SOURCE_FILE@item TYPE_FIELDSA linked list (via @code{TREE_CHAIN}) of member types of a class.  Thelist can contain @code{TYPE_DECL}s, but there can also be other thingsin the list apparently.  See also @code{CLASSTYPE_TAGS}.@item TYPE_VIRTUAL_PA flag used on a @code{FIELD_DECL} or a @code{VAR_DECL}, indicates it isa virtual function table or a pointer to one.  When used on a@code{FUNCTION_DECL}, indicates that it is a virtual function.  Whenused on an @code{IDENTIFIER_NODE}, indicates that a function with thissame name exists and has been declared virtual.When used on types, it indicates that the type has virtual functions, oris derived from one that does.Not sure if the above about virtual function tables is still true.  Seealso info on @code{DECL_VIRTUAL_P}.What things can this be used on:	FIELD_DECLs, VAR_DECLs, FUNCTION_DECLs, IDENTIFIER_NODEs@item VF_BASETYPE_VALUEGet the associated type from the binfo that caused the given vfield toexist.  This is the least derived class (the most parent class) thatneeded a virtual function table.  It is probably the case that all usesof this field are misguided, but they need to be examined on acase-by-case basis.  See history for more information on why theprevious statement was made.Set at @code{finish_base_struct} time.What things can this be used on:	TREE_LISTs that are vfieldsHistory:	This field was used to determine if a virtual function table's	slot should be filled in with a certain virtual function, by	checking to see if the type returned by VF_BASETYPE_VALUE was a	parent of the context in which the old virtual function existed.	This incorrectly assumes that a given type _could_ not appear as	a parent twice in a given inheritance lattice.  For single	inheritance, this would in fact work, because a type could not	possibly appear more than once in an inheritance lattice, but	with multiple inheritance, a type can appear more than once.@item VF_BINFO_VALUEIdentifies the binfo that caused this vfield to exist.  If this vfieldis from the first direct base class that has a virtual function table,then VF_BINFO_VALUE is NULL_TREE, otherwise it will be the binfo of thedirect base where the vfield came from.  Can use @code{TREE_VIA_VIRTUAL}on result to find out if it is a virtual base class.  Related to thebinfo found by@example

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -