/* Definitions for C++ parsing and type checking.
- Copyright (C) 1987, 92-97, 1998, 1999, 2000 Free Software Foundation, Inc.
- Hacked by Michael Tiemann (tiemann@cygnus.com)
+ Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
+ Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
ICS_ELLIPSIS_FLAG (in _CONV)
STMT_IS_FULL_EXPR_P (in _STMT)
2: IDENTIFIER_OPNAME_P.
- BINFO_VBASE_MARKED.
- BINFO_FIELDS_MARKED.
TYPE_POLYMORHPIC_P (in _TYPE)
ICS_THIS_FLAG (in _CONV)
STMT_LINENO_FOR_FN_P (in _STMT)
1: TYPE_HAS_CONSTRUCTOR.
2: TYPE_HAS_DESTRUCTOR.
3: TYPE_FOR_JAVA.
- 4: TYPE_NEEDS_DESTRUCTOR.
+ 4: TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5: IS_AGGR_TYPE.
6: TYPE_BUILT_IN.
For a TEMPLATE_TEMPLATE_PARM, this is
TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
- DECL_SAVED_INSNS/DECL_FIELD_SIZE
- For a static VAR_DECL, this is DECL_INIT_PRIORITY.
-
- BINFO_VIRTUALS
+ BINFO_VIRTUALS
For a binfo, this is a TREE_LIST. The BV_DELTA of each node
gives the amount by which to adjust the `this' pointer when
calling the function. If the method is an overriden version of a
this function. (This binfo's BINFO_TYPE will always be the same
as the DECL_CLASS_CONTEXT for the function.)
+ BINFO_VTABLE
+ Sometimes this is a VAR_DECL. Under the new ABI, it is instead
+ an expression with POINTER_TYPE pointing that gives the value
+ to which the vptr should be initialized. Use get_vtbl_decl_for_binfo
+ to extract the VAR_DECL for the complete vtable; that macro works
+ in both ABIs.
+
DECL_ARGUMENTS
For a VAR_DECL this is DECL_ANON_UNION_ELEMS.
to get the type_info object address. */
#define new_abi_rtti_p() (flag_new_abi)
+/* Nonzero if primary and secondary vtables are combined into a single
+ vtable. */
+#define merge_primary_and_secondary_vtables_p() (flag_new_abi)
+
\f
/* Language-dependent contents of an identifier. */
int linenum;
};
-/* To identify to the debug emitters if it should pay attention to the
- flag `-Wtemplate-debugging'. */
-#define HAVE_TEMPLATES 1
-
/* Macros for access to language-specific slots in an identifier. */
#define IDENTIFIER_NAMESPACE_BINDINGS(NODE) \
OPERATOR_TYPENAME_FORMAT, \
strlen (OPERATOR_TYPENAME_FORMAT)))
-/* Nonzero means reject anything that ANSI standard C forbids. */
+/* Nonzero means reject anything that ISO standard C++ forbids. */
extern int pedantic;
/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only. */
CPTI_WCHAR_DECL,
CPTI_VTABLE_ENTRY_TYPE,
CPTI_DELTA_TYPE,
+ CPTI_VTABLE_INDEX_TYPE,
CPTI_CLEANUP_TYPE,
CPTI_TI_DESC_TYPE,
CPTI_BLTN_DESC_TYPE,
CPTI_PTR_DESC_TYPE,
- CPTI_REF_DESC_TYPE,
CPTI_ARY_DESC_TYPE,
CPTI_FUNC_DESC_TYPE,
CPTI_ENUM_DESC_TYPE,
CPTI_PTMD_DESC_TYPE,
CPTI_BASE_DESC_TYPE,
- CPTI_CLASS_STAR_TYPE,
CPTI_CLASS_TYPE,
CPTI_RECORD_TYPE,
CPTI_UNION_TYPE,
CPTI_VTBL_TYPE,
CPTI_VTBL_PTR_TYPE,
CPTI_STD,
+ CPTI_ABI,
CPTI_TYPE_INFO_TYPE,
CPTI_TINFO_DECL_ID,
CPTI_TINFO_DECL_TYPE,
CPTI_ACCESS_PRIVATE_VIRTUAL,
CPTI_CTOR_IDENTIFIER,
+ CPTI_COMPLETE_CTOR_IDENTIFIER,
+ CPTI_BASE_CTOR_IDENTIFIER,
+ CPTI_DTOR_IDENTIFIER,
+ CPTI_BASE_DTOR_IDENTIFIER,
+ CPTI_DELETING_DTOR_IDENTIFIER,
CPTI_DELTA2_IDENTIFIER,
CPTI_DELTA_IDENTIFIER,
- CPTI_DTOR_IDENTIFIER,
CPTI_IN_CHARGE_IDENTIFIER,
CPTI_INDEX_IDENTIFIER,
CPTI_NELTS_IDENTIFIER,
CPTI_TERMINATE,
CPTI_ATEXIT,
CPTI_DSO_HANDLE,
- CPTI_BAD_CAST,
- CPTI_BAD_TYPEID,
CPTI_DCAST,
CPTI_MAX
#define void_zero_node cp_global_trees[CPTI_VOID_ZERO]
#define wchar_decl_node cp_global_trees[CPTI_WCHAR_DECL]
#define vtable_entry_type cp_global_trees[CPTI_VTABLE_ENTRY_TYPE]
+/* The type used to represent an offset by which to adjust the `this'
+ pointer in pointer-to-member types and, when not using vtable
+ thunks, in vtables. */
#define delta_type_node cp_global_trees[CPTI_DELTA_TYPE]
+/* The type used to represent an index into the vtable. */
+#define vtable_index_type cp_global_trees[CPTI_VTABLE_INDEX_TYPE]
#define ti_desc_type_node cp_global_trees[CPTI_TI_DESC_TYPE]
#define bltn_desc_type_node cp_global_trees[CPTI_BLTN_DESC_TYPE]
#define ptr_desc_type_node cp_global_trees[CPTI_PTR_DESC_TYPE]
-#define ref_desc_type_node cp_global_trees[CPTI_REF_DESC_TYPE]
#define ary_desc_type_node cp_global_trees[CPTI_ARY_DESC_TYPE]
#define func_desc_type_node cp_global_trees[CPTI_FUNC_DESC_TYPE]
#define enum_desc_type_node cp_global_trees[CPTI_ENUM_DESC_TYPE]
#define ptmd_desc_type_node cp_global_trees[CPTI_PTMD_DESC_TYPE]
#define base_desc_type_node cp_global_trees[CPTI_BASE_DESC_TYPE]
-#define class_star_type_node cp_global_trees[CPTI_CLASS_STAR_TYPE]
#define class_type_node cp_global_trees[CPTI_CLASS_TYPE]
#define record_type_node cp_global_trees[CPTI_RECORD_TYPE]
#define union_type_node cp_global_trees[CPTI_UNION_TYPE]
#define vtbl_type_node cp_global_trees[CPTI_VTBL_TYPE]
#define vtbl_ptr_type_node cp_global_trees[CPTI_VTBL_PTR_TYPE]
#define std_node cp_global_trees[CPTI_STD]
+#define abi_node cp_global_trees[CPTI_ABI]
#define type_info_type_node cp_global_trees[CPTI_TYPE_INFO_TYPE]
#define tinfo_decl_id cp_global_trees[CPTI_TINFO_DECL_ID]
#define tinfo_decl_type cp_global_trees[CPTI_TINFO_DECL_TYPE]
/* We cache these tree nodes so as to call get_identifier less
frequently. */
+/* The name of a constructor that takes an in-charge parameter to
+ decide whether or not to call virtual base classes. */
#define ctor_identifier cp_global_trees[CPTI_CTOR_IDENTIFIER]
+/* The name of a constructor that constructs virtual base classes. */
+#define complete_ctor_identifier cp_global_trees[CPTI_COMPLETE_CTOR_IDENTIFIER]
+/* The name of a constructor that does not construct virtual base classes. */
+#define base_ctor_identifier cp_global_trees[CPTI_BASE_CTOR_IDENTIFIER]
+/* The name of a destructor that destroys virtual base classes. */
+#define dtor_identifier cp_global_trees[CPTI_DTOR_IDENTIFIER]
+/* The name of a destructor that does not destroy virtual base
+ classes. */
+#define base_dtor_identifier cp_global_trees[CPTI_BASE_DTOR_IDENTIFIER]
+/* The name of a destructor that destroys virtual base classes, and
+ then deletes the entire object. */
+#define deleting_dtor_identifier cp_global_trees[CPTI_DELETING_DTOR_IDENTIFIER]
+
#define delta2_identifier cp_global_trees[CPTI_DELTA2_IDENTIFIER]
#define delta_identifier cp_global_trees[CPTI_DELTA_IDENTIFIER]
-#define dtor_identifier cp_global_trees[CPTI_DTOR_IDENTIFIER]
#define in_charge_identifier cp_global_trees[CPTI_IN_CHARGE_IDENTIFIER]
#define index_identifier cp_global_trees[CPTI_INDEX_IDENTIFIER]
#define nelts_identifier cp_global_trees[CPTI_NELTS_IDENTIFIER]
/* A pointer to `__dso_handle'. */
#define dso_handle_node cp_global_trees[CPTI_DSO_HANDLE]
-/* The declaration of __throw_bad_cast. */
-#define throw_bad_cast_node cp_global_trees[CPTI_BAD_CAST]
-
-/* The declaration of __throw_bad_typeid. */
-#define throw_bad_typeid_node cp_global_trees[CPTI_BAD_TYPEID]
-
/* The declaration of the dynamic_cast runtime. */
#define dynamic_cast_node cp_global_trees[CPTI_DCAST]
extern int warn_old_style_cast;
+/* Non-zero means warn when the compiler will reorder code. */
+
+extern int warn_reorder;
+
/* Nonzero means to treat bitfields as unsigned unless they say `signed'. */
extern int flag_signed_bitfields;
extern int flag_elide_constructors;
-/* Nonzero means enable obscure ANSI features and disable GNU extensions
- that might cause ANSI-compliant code to be miscompiled. */
+/* Nonzero means enable obscure standard features and disable GNU
+ extensions that might cause standard-compliant code to be
+ miscompiled. */
extern int flag_ansi;
The value of this flag is ignored if -pedantic is specified. */
extern int flag_permissive;
+/* Nonzero means to implement standard semantics for exception
+ specifications, calling unexpected if an exception is thrown that
+ doesn't match the specification. Zero means to treat them as
+ assertions and optimize accordingly, but not check them. */
+extern int flag_enforce_eh_specs;
+
/* Nonzero if we want to obey access control semantics. */
extern int flag_access_control;
unsigned has_const_assign_ref : 1;
unsigned anon_aggr : 1;
- unsigned has_nonpublic_ctor : 2;
- unsigned has_nonpublic_assign_ref : 2;
+ unsigned has_mutable : 1;
+ unsigned com_interface : 1;
+ unsigned non_pod_class : 1;
+ unsigned nearly_empty_p : 1;
unsigned vtable_needs_writing : 1;
unsigned has_assign_ref : 1;
- unsigned gets_new : 2;
+ unsigned has_new : 1;
+ unsigned has_array_new : 1;
unsigned gets_delete : 2;
unsigned has_call_overloaded : 1;
unsigned has_abstract_assign_ref : 1;
unsigned non_aggregate : 1;
unsigned is_partial_instantiation : 1;
- unsigned has_mutable : 1;
-
- unsigned com_interface : 1;
- unsigned non_pod_class : 1;
- unsigned nearly_empty_p : 1;
/* When adding a flag here, consider whether or not it ought to
apply to a template instance if it applies to the template. If
so, make sure to copy it in instantiate_class_template! */
- /* There are six bits left to fill out a 32-bit word. Keep track of
- this by updating the size of this bitfield whenever you add or
+ /* There are some bits left to fill out a 32-bit word. Keep track
+ of this by updating the size of this bitfield whenever you add or
remove a flag. */
- unsigned dummy : 5;
+ unsigned dummy : 9;
int vsize;
int vfield_parent;
- union tree_node *vfields;
- union tree_node *vbases;
-
- union tree_node *tags;
-
- union tree_node *search_slot;
-
- union tree_node *size;
-
- union tree_node *pure_virtuals;
- union tree_node *friend_classes;
-
- union tree_node *rtti;
-
- union tree_node *methods;
-
- union tree_node *template_info;
+ tree vfields;
+ tree vbases;
+ tree tags;
+ tree search_slot;
+ tree size;
+ tree size_unit;
+ tree pure_virtuals;
+ tree friend_classes;
+ tree rtti;
+ tree methods;
+ tree template_info;
tree befriending_classes;
};
/* List of friends which were defined inline in this class definition. */
#define CLASSTYPE_INLINE_FRIENDS(NODE) (TYPE_NONCOPIED_PARTS (NODE))
-/* Nonzero for _CLASSTYPE means that operator new and delete are defined,
- respectively. */
-#define TYPE_GETS_NEW(NODE) (TYPE_LANG_SPECIFIC(NODE)->gets_new)
+/* Nonzero for _CLASSTYPE means that operator delete is defined. */
#define TYPE_GETS_DELETE(NODE) (TYPE_LANG_SPECIFIC(NODE)->gets_delete)
#define TYPE_GETS_REG_DELETE(NODE) (TYPE_GETS_DELETE (NODE) & 1)
takes the optional size_t argument. */
#define TYPE_VEC_DELETE_TAKES_SIZE(NODE) \
(TYPE_LANG_SPECIFIC(NODE)->vec_delete_takes_size)
-#define TYPE_VEC_NEW_USES_COOKIE(NODE) \
- (TYPE_NEEDS_DESTRUCTOR (NODE) \
- || (TYPE_LANG_SPECIFIC (NODE) && TYPE_VEC_DELETE_TAKES_SIZE (NODE)))
+
+/* Nonzero if `new NODE[x]' should cause the allocation of extra
+ storage to indicate how many array elements are in use. The old
+ ABI had a bug in that we always allocate the extra storage if NODE
+ has a two-argument array operator delete. */
+#define TYPE_VEC_NEW_USES_COOKIE(NODE) \
+ (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE) \
+ || (TYPE_LANG_SPECIFIC (NODE) \
+ && TYPE_VEC_DELETE_TAKES_SIZE (NODE)))
/* Nonzero means that this _CLASSTYPE node defines ways of converting
itself to other types. */
#define TYPE_HAS_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_init_ref)
#define TYPE_HAS_CONST_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_const_init_ref)
+/* Nonzero if this class defines an overloaded operator new. (An
+ operator new [] doesn't count.) */
+#define TYPE_HAS_NEW_OPERATOR(NODE) \
+ (TYPE_LANG_SPECIFIC (NODE)->has_new)
+
+/* Nonzero if this class defines an overloaded operator new[]. */
+#define TYPE_HAS_ARRAY_NEW_OPERATOR(NODE) \
+ (TYPE_LANG_SPECIFIC (NODE)->has_array_new)
+
/* Nonzero means that this type is being defined. I.e., the left brace
starting the definition of this type has been seen. */
#define TYPE_BEING_DEFINED(NODE) (TYPE_LANG_SPECIFIC(NODE)->being_defined)
#define CLASSTYPE_PRIMARY_BINFO(NODE) \
(BINFO_PRIMARY_BINFO (TYPE_BINFO (NODE)))
-/* If non-NULL, this is the binfo for the primary base of BINFO. */
+/* If non-NULL, this is the binfo for the primary base of BINFO. Note
+ that in a complex hierarchy the resulting BINFO may not actually
+ *be* primary. In particular if the resulting BINFO is a virtual
+ base, and it occurs elsewhere in the hierarchy, then this
+ occurrence may not actually be a primary base in the complete
+ object. Check BINFO_PRIMARY_MARKED_P to be sure. */
#define BINFO_PRIMARY_BINFO(NODE) \
(CLASSTYPE_HAS_PRIMARY_BASE_P (BINFO_TYPE (NODE)) \
? BINFO_BASETYPE (NODE, \
CLASSTYPE_VFIELD_PARENT (BINFO_TYPE (NODE))) \
: NULL_TREE)
-/* The number of virtual functions defined for this
- _CLASSTYPE node. */
+/* The number of virtual functions present in this class' virtual
+ function table. */
#define CLASSTYPE_VSIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->vsize)
/* A chain of BINFOs for the direct and indirect virtual base classes
- that this type uses in depth-first left-to-right order. These
- BINFOs are distinct from those in the TYPE_BINFO hierarchy. So,
- given:
+ that this type uses in a post-order depth-first left-to-right
+ order. (In other words, these bases appear in the order that they
+ should be initialized.)
+
+ These BINFOs are distinct from those in the TYPE_BINFO hierarchy.
+ So, given:
struct A {};
struct B : public A {};
there will be two copies of `A' and `B' in the TYPE_BINFO hierarchy
for `E'. On the CLASSTYPE_VBASECLASSES list, there will be just
- one copy of `A' (distinct from the other two) with its own copy of `B'
+ one copy of `B' (distinct from the other two) with its own copy of `A'
(also distinct from the copies in the TYPE_BINFO hierarchy.) */
#define CLASSTYPE_VBASECLASSES(NODE) (TYPE_LANG_SPECIFIC(NODE)->vbases)
-/* The BINFO (if any) for the virtual baseclass T of the class C. */
+/* The BINFO (if any) for the virtual baseclass T of the class C from
+ the CLASSTYPE_VBASECLASSES list. */
#define BINFO_FOR_VBASE(T, C) \
(binfo_member (T, CLASSTYPE_VBASECLASSES (C)))
+/* For a non-virtual BINFO, the BINFO itself; for a virtual BINFO, the
+ BINFO_FOR_VBASE. C is the most derived class for the hierarchy
+ containing BINFO. */
+#define CANONICAL_BINFO(BINFO, C) \
+ (TREE_VIA_VIRTUAL (BINFO) \
+ ? BINFO_FOR_VBASE (BINFO_TYPE (BINFO), C) \
+ : BINFO)
+
/* Number of direct baseclasses of NODE. */
#define CLASSTYPE_N_BASECLASSES(NODE) \
(BINFO_N_BASETYPES (TYPE_BINFO (NODE)))
which uses this must define what exactly this slot is used for. */
#define CLASSTYPE_SEARCH_SLOT(NODE) (TYPE_LANG_SPECIFIC(NODE)->search_slot)
-/* These are the size, mode and alignment of the type without its
- virtual base classes, for when we use this type as a base itself. */
+/* These are the size and alignment of the type without its virtual
+ base classes, for when we use this type as a base itself. */
#define CLASSTYPE_SIZE(NODE) (TYPE_LANG_SPECIFIC(NODE)->size)
+#define CLASSTYPE_SIZE_UNIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->size_unit)
#define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align)
/* A cons list of virtual functions which cannot be inherited by
/* Nonzero means that this type has an X() constructor. */
#define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_default_ctor)
-/* Nonzero means the type declared a ctor as private or protected. We
- use this to make sure we don't try to generate a copy ctor for a
- class that has a member of type NODE. */
-#define TYPE_HAS_NONPUBLIC_CTOR(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_nonpublic_ctor)
-
-/* Ditto, for operator=. */
-#define TYPE_HAS_NONPUBLIC_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_nonpublic_assign_ref)
-
/* Nonzero means that this type contains a mutable member */
#define CLASSTYPE_HAS_MUTABLE(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_mutable)
#define TYPE_HAS_MUTABLE_P(NODE) (cp_has_mutable_p (NODE))
We use TREE_VIA_PROTECTED and TREE_VIA_PUBLIC, but private
inheritance is indicated by the absence of the other two flags, not
- by TREE_VIA_PRIVATE, which is unused.
-
- The TREE_CHAIN is for scratch space in search.c. */
+ by TREE_VIA_PRIVATE, which is unused. */
/* Nonzero means marked by DFS or BFS search, including searches
by `get_binfo' and `get_base_distance'. */
#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=1))
#define CLEAR_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=0))
-/* Nonzero means marked in search through virtual inheritance hierarchy. */
-#define BINFO_VBASE_MARKED(NODE) CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
-/* Modifier macros */
-#define SET_BINFO_VBASE_MARKED(NODE) SET_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
-#define CLEAR_BINFO_VBASE_MARKED(NODE) CLEAR_CLASSTYPE_MARKED2 (BINFO_TYPE (NODE))
-
-/* Nonzero means marked in search for members or member functions. */
-#define BINFO_FIELDS_MARKED(NODE) \
- (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED2 (BINFO_TYPE (NODE)):TREE_LANG_FLAG_2(NODE))
-#define SET_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=1))
-#define CLEAR_BINFO_FIELDS_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED2(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_2(NODE)=0))
-
/* Nonzero means that this class is on a path leading to a new vtable. */
#define BINFO_VTABLE_PATH_MARKED(NODE) \
(TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):TREE_LANG_FLAG_3(NODE))
#define SET_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=1))
#define CLEAR_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=0))
-/* Nonzero means that this class has a new vtable. */
-#define BINFO_NEW_VTABLE_MARKED(NODE) \
- (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):TREE_LANG_FLAG_4(NODE))
-#define SET_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=1))
-#define CLEAR_BINFO_NEW_VTABLE_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKED4(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_4(NODE)=0))
+/* Nonzero means B (a BINFO) needs a new vtable. B is part of the
+ hierarchy dominated by C. */
+#define BINFO_NEW_VTABLE_MARKED(B, C) \
+ (TREE_LANG_FLAG_4 (CANONICAL_BINFO (B, C)))
+#define SET_BINFO_NEW_VTABLE_MARKED(B, C) \
+ (BINFO_NEW_VTABLE_MARKED (B, C) = 1)
+#define CLEAR_BINFO_NEW_VTABLE_MARKED(B, C) \
+ (BINFO_NEW_VTABLE_MARKED (B, C) = 0)
/* Nonzero means this class has done dfs_pushdecls. */
#define BINFO_PUSHDECLS_MARKED(NODE) BINFO_VTABLE_PATH_MARKED (NODE)
unsigned constructor_for_vbase_attr : 1;
unsigned mutable_flag : 1;
- unsigned saved_inline : 1;
+ unsigned deferred : 1;
unsigned use_template : 2;
unsigned nonconverting : 1;
unsigned declared_inline : 1;
{
struct lang_decl_flags decl_flags;
- tree main_decl_variant;
tree befriending_classes;
/* In a FUNCTION_DECL, this is DECL_SAVED_TREE. */
#define SET_DECL_TINFO_FN_P(NODE) \
(DECL_LANG_SPECIFIC((NODE))->decl_flags.mutable_flag = 1)
+/* Nonzero if NODE is an overloaded `operator delete[]' function. */
+#define DECL_ARRAY_DELETE_OPERATOR_P(NODE) \
+ (DECL_NAME (NODE) == ansi_opname[(int) VEC_DELETE_EXPR])
+
/* Nonzero for _DECL means that this decl appears in (or will appear
in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for
detecting circularity in case members are multiply defined. In the
(DECL_LANG_SPECIFIC(NODE)->decl_flags.pretty_function_p)
/* The _TYPE context in which this _DECL appears. This field holds the
- class where a virtual function instance is actually defined, and the
- lexical scope of a friend function defined in a class body. */
-#define DECL_CLASS_CONTEXT(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.context)
-#define DECL_REAL_CONTEXT(NODE) \
- ((TREE_CODE (NODE) == FUNCTION_DECL && DECL_FUNCTION_MEMBER_P (NODE)) \
- ? DECL_CLASS_CONTEXT (NODE) : CP_DECL_CONTEXT (NODE))
+ class where a virtual function instance is actually defined. */
+#define DECL_CLASS_CONTEXT(NODE) \
+ (DECL_CLASS_SCOPE_P (NODE) ? DECL_CONTEXT (NODE) : NULL_TREE)
+
+/* For a non-member friend function, the class (if any) in which this
+ friend was defined. For example, given:
+
+ struct S { friend void f (); };
+
+ the DECL_FRIEND_CONTEXT for `f' will be `S'. */
+#define DECL_FRIEND_CONTEXT(NODE) \
+ ((DECL_FRIEND_P (NODE) && !DECL_FUNCTION_MEMBER_P (NODE)) \
+ ? DECL_LANG_SPECIFIC (NODE)->decl_flags.context \
+ : NULL_TREE)
+
+/* Set the DECL_FRIEND_CONTEXT for NODE to CONTEXT. */
+#define SET_DECL_FRIEND_CONTEXT(NODE, CONTEXT) \
+ (DECL_LANG_SPECIFIC (NODE)->decl_flags.context = (CONTEXT))
/* NULL_TREE in DECL_CONTEXT represents the global namespace. */
#define CP_DECL_CONTEXT(NODE) \
/* For a virtual function, the base where we find its vtable entry.
For a non-virtual function, the base where it is defined. */
-#define DECL_VIRTUAL_CONTEXT(NODE) DECL_CONTEXT (NODE)
+#define DECL_VIRTUAL_CONTEXT(NODE) \
+ (DECL_LANG_SPECIFIC (NODE)->decl_flags.context)
/* 1 iff NODE has namespace scope, including the global namespace. */
#define DECL_NAMESPACE_SCOPE_P(NODE) \
/* 1 iff NODE is a class member. */
#define DECL_CLASS_SCOPE_P(NODE) \
- (DECL_CONTEXT (NODE) \
- && TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (NODE))) == 't')
+ (DECL_CONTEXT (NODE) && TYPE_P (DECL_CONTEXT (NODE)))
/* 1 iff NODE is function-local. */
#define DECL_FUNCTION_SCOPE_P(NODE) \
/* In a non-local VAR_DECL with static storage duration, this is the
initialization priority. If this value is zero, the NODE will be
initialized at the DEFAULT_INIT_PRIORITY. */
-#define DECL_INIT_PRIORITY(NODE) (DECL_FIELD_SIZE (VAR_DECL_CHECK (NODE)))
+#define DECL_INIT_PRIORITY(NODE) (VAR_DECL_CHECK (NODE)->decl.u2.i)
-/* In a TREE_LIST concatenating using directives, indicate indirekt
+/* In a TREE_LIST concatenating using directives, indicate indirect
directives */
#define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->common.lang_flag_0)
/* In a VAR_DECL for a variable declared in a for statement,
this is the shadowed (local) variable. */
-#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT(VAR_DECL_CHECK (NODE))
-
-/* Points back to the decl which caused this lang_decl to be allocated. */
-#define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)
+#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT_FLD(VAR_DECL_CHECK (NODE))
/* In a FUNCTION_DECL, this is nonzero if this function was defined in
the class definition. We have saved away the text of the function,
#define DECL_SORTED_FIELDS(NODE) \
(DECL_LANG_SPECIFIC (TYPE_DECL_CHECK (NODE))->u.sorted_fields)
-/* True if on the saved_inlines (see decl2.c) list. */
-#define DECL_SAVED_INLINE(DECL) \
- (DECL_LANG_SPECIFIC(DECL)->decl_flags.saved_inline)
+/* True if on the deferred_fns (see decl2.c) list. */
+#define DECL_DEFERRED_FN(DECL) \
+ (DECL_LANG_SPECIFIC(DECL)->decl_flags.deferred)
/* For a VAR_DECL, FUNCTION_DECL, TYPE_DECL or TEMPLATE_DECL:
template-specific information. */
#define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))
#define TI_ARGS(NODE) (TREE_VALUE (NODE))
-#define TI_SPEC_INFO(NODE) (TREE_CHAIN (NODE))
#define TI_PENDING_TEMPLATE_FLAG(NODE) TREE_LANG_FLAG_1 (NODE)
/* We use TREE_VECs to hold template arguments. If there is only one
#define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE))
#define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
#define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))
-#define CLASSTYPE_TI_SPEC_INFO(NODE) TI_SPEC_INFO (CLASSTYPE_TEMPLATE_INFO (NODE))
#define ENUM_TI_TEMPLATE(NODE) \
TI_TEMPLATE (ENUM_TEMPLATE_INFO (NODE))
#define ENUM_TI_ARGS(NODE) \
&& DECL_LANG_SPECIFIC (NODE)->decl_flags.bitfield)
#define SET_DECL_C_BIT_FIELD(NODE) \
(DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))->decl_flags.bitfield = 1)
+#define CLEAR_DECL_C_BIT_FIELD(NODE) \
+ (DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))->decl_flags.bitfield = 0)
/* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */
#define DECL_UNINLINABLE(NODE) \
#define TYPE_HAS_ABSTRACT_ASSIGN_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->has_abstract_assign_ref)
#define TYPE_HAS_COMPLEX_INIT_REF(NODE) (TYPE_LANG_SPECIFIC(NODE)->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 if TYPE has a trivial destructor. From [class.dtor]:
+
+ A destructor is trivial if it is an implicitly declared
+ destructor and if:
+
+ - all of the direct base classes of its class have trivial
+ destructors,
+
+ - for all of the non-static data members of its class that are
+ of class type (or array thereof), each such class has a
+ trivial destructor. */
+#define TYPE_HAS_TRIVIAL_DESTRUCTOR(NODE) \
+ (!TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE))
+
+/* Nonzero for _TYPE node means that this type does not have a trivial
+ destructor. Therefore, 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_HAS_NONTRIVIAL_DESTRUCTOR(NODE) \
+ (TYPE_LANG_FLAG_4(NODE))
/* Nonzero for class type means that initialization of this type can use
a bitwise copy. */
function.
(Of course, the exact values may differ depending on the mangling
- scheme, sizes of types, and such.). */
+ scheme, sizes of types, and such.).
+
+ Under the new ABI, we do:
+
+ struct {
+ __P __pfn;
+ ptrdiff_t __delta;
+ };
+
+ (We don't need DELTA2, because the vtable is always the first thing
+ in the object.) If the function is virtual, then PFN is one plus
+ twice the index into the vtable; otherwise, it is just a pointer to
+ the function. */
/* 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)))))))
+#define TYPE_PTRMEMFUNC_FN_TYPE(NODE) \
+ (flag_new_abi \
+ ? (TREE_TYPE (TYPE_FIELDS (NODE))) \
+ : (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (TREE_CHAIN (TREE_CHAIN (TYPE_FIELDS (NODE))))))))
/* Returns `A' for a type like `int (A::*)(double)' */
#define TYPE_PTRMEMFUNC_OBJECT_TYPE(NODE) \
#define DECL_NTPARMS(NODE) \
TREE_VEC_LENGTH (DECL_INNERMOST_TEMPLATE_PARMS (NODE))
/* For function, method, class-data templates. */
-#define DECL_TEMPLATE_RESULT(NODE) DECL_RESULT(NODE)
+#define DECL_TEMPLATE_RESULT(NODE) DECL_RESULT_FLD(NODE)
/* For a static member variable template, the
DECL_TEMPLATE_INSTANTIATIONS list contains the explicitly and
implicitly generated instantiations of the variable. There are no
/* An integer indicating how many bytes should be subtracted from the
`this' pointer when this function is called. */
-#define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i)
+#define THUNK_DELTA(DECL) (DECL_CHECK (DECL)->decl.u1.i)
/* An integer indicating how many bytes should be subtracted from the
vtable for the `this' pointer to find the vcall offset. (The vptr
- is always located at offset zero from the `this' pointer.) If
+ is always located at offset zero from the f `this' pointer.) If
zero, then there is no vcall offset. */
-#define THUNK_VCALL_OFFSET(DECL) (DECL_FIELD_SIZE (DECL))
+#define THUNK_VCALL_OFFSET(DECL) (DECL_CHECK (DECL)->decl.u2.i)
/* DECL_NEEDED_P holds of a declaration when we need to emit its
definition. This is true when the back-end tells us that
the symbol has been referenced in the generated code. If, however,
we are not generating code, then it is also true when a symbol has
- just been used somewhere, even if it's not really needed. */
+ just been used somewhere, even if it's not really needed. We need
+ anything that isn't comdat, but we don't know for sure whether or
+ not something is comdat until end-of-file. */
#define DECL_NEEDED_P(DECL) \
- (! DECL_COMDAT (DECL) \
+ ((at_eof && !DECL_COMDAT (DECL)) \
|| (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL)))) \
|| (flag_syntax_only && TREE_USED ((DECL))))
clk_bitfield = 4, /* An lvalue for a bit-field. */
} cp_lvalue_kind;
+/* The kinds of scopes we recognize. */
+typedef enum scope_kind {
+ sk_template_parms, /* A scope for template parameters. */
+ sk_template_spec /* A scope corresponding to a template
+ specialization. There is never anything in
+ this scope. */
+} scope_kind;
+
+/* Various kinds of template specialization, instantiation, etc. */
+typedef enum tmpl_spec_kind {
+ tsk_none, /* Not a template at all. */
+ tsk_invalid_member_spec, /* An explicit member template
+ specialization, but the enclosing
+ classes have not all been explicitly
+ specialized. */
+ tsk_invalid_expl_inst, /* An explicit instantiation containing
+ template parameter lists. */
+ tsk_excessive_parms, /* A template declaration with too many
+ template parameter lists. */
+ tsk_insufficient_parms, /* A template declaration with too few
+ parameter lists. */
+ tsk_template, /* A template declaration. */
+ tsk_expl_spec, /* An explicit specialization. */
+ tsk_expl_inst /* An explicit instantiation. */
+} tmpl_spec_kind;
+
+/* The various kinds of access. BINFO_ACCESS depends on these being
+ two bit quantities. The numerical values are important; they are
+ used to initialize RTTI data structures, so chaning them changes
+ the ABI. */
+typedef enum access_kind {
+ ak_none = 0, /* Inaccessible. */
+ ak_public = 1, /* Accessible, as a `public' thing. */
+ ak_protected = 2, /* Accessible, as a `protected' thing. */
+ ak_private = 3 /* Accessible, as a `private' thing. */
+} access_kind;
+
+typedef enum special_function_kind {
+ sfk_none, /* Not a special function. */
+ sfk_constructor, /* A constructor. */
+ sfk_copy_constructor, /* A copy constructor. */
+ sfk_assignment_operator, /* An assignment operator. */
+ sfk_destructor, /* A destructor. */
+ sfk_conversion /* A conversion operator. */
+} special_function_kind;
+
/* 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 void overflow_warning PARAMS ((tree));
extern void unsigned_conversion_warning PARAMS ((tree, tree));
extern void c_apply_type_quals_to_decl PARAMS ((int, tree));
+extern unsigned int min_precision PARAMS ((tree, int));
/* Read the rest of the current #-directive line. */
#if USE_CPPLIB
/* Points to the name of that function. May not be the DECL_NAME
of CURRENT_FUNCTION_DECL due to overloading */
extern tree original_function_name;
-
-/* in init.c */
-extern tree global_base_init_list;
-
\f
/* Here's where we control how name mangling takes place. */
LOOKUP_NONVIRTUAL means make a direct call to the member function found
LOOKUP_GLOBAL means search through the space of overloaded functions,
as well as the space of member functions.
- LOOKUP_HAS_IN_CHARGE means that the "in charge" variable is already
- in the parameter list.
LOOKUP_ONLYCONVERTING means that non-conversion constructors are not tried.
DIRECT_BIND means that if a temporary is created, it should be created so
that it lives as long as the current variable bindings; otherwise it
#define LOOKUP_PROTECT (1)
#define LOOKUP_COMPLAIN (2)
#define LOOKUP_NORMAL (3)
-/* #define LOOKUP_UNUSED (4) */
#define LOOKUP_NONVIRTUAL (8)
#define LOOKUP_GLOBAL (16)
-#define LOOKUP_HAS_IN_CHARGE (32)
#define LOOKUP_SPECULATIVELY (64)
#define LOOKUP_ONLYCONVERTING (128)
#define DIRECT_BIND (256)
extern tree resolve_scope_to_name PARAMS ((tree, tree));
extern tree build_scoped_method_call PARAMS ((tree, tree, tree, tree));
extern tree build_addr_func PARAMS ((tree));
-extern tree build_call PARAMS ((tree, tree, tree));
+extern tree build_call PARAMS ((tree, tree));
extern tree build_method_call PARAMS ((tree, tree, tree, tree, int));
extern int null_ptr_cst_p PARAMS ((tree));
extern tree type_decays_to PARAMS ((tree));
extern tree build_user_type_conversion PARAMS ((tree, tree, int));
extern tree build_new_function_call PARAMS ((tree, tree));
extern tree build_new_op PARAMS ((enum tree_code, int, tree, tree, tree));
-extern tree build_op_new_call PARAMS ((enum tree_code, tree, tree, int));
extern tree build_op_delete_call PARAMS ((enum tree_code, tree, tree, int, tree));
extern int can_convert PARAMS ((tree, tree));
extern int can_convert_arg PARAMS ((tree, tree, tree));
extern int enforce_access PARAMS ((tree, tree));
-extern tree convert_default_arg PARAMS ((tree, tree, tree));
+extern tree convert_default_arg PARAMS ((tree, tree, tree, int));
extern tree convert_arg_to_ellipsis PARAMS ((tree));
extern tree build_x_va_arg PARAMS ((tree, tree));
extern tree convert_type_from_ellipsis PARAMS ((tree));
extern void pop_lang_context PARAMS ((void));
extern tree instantiate_type PARAMS ((tree, tree, int));
extern void print_class_statistics PARAMS ((void));
-extern tree skip_rtti_stuff PARAMS ((tree, tree, unsigned HOST_WIDE_INT *));
+extern int first_vfun_index PARAMS ((tree));
extern void build_self_reference PARAMS ((void));
extern void warn_hidden PARAMS ((tree));
extern tree get_enclosing_class PARAMS ((tree));
extern void invalidate_class_lookup_cache PARAMS ((void));
extern void maybe_note_name_used_in_class PARAMS ((tree, tree));
extern void note_name_declared_in_class PARAMS ((tree, tree));
-extern tree num_extra_vtbl_entries PARAMS ((tree));
-extern tree size_extra_vtbl_entries PARAMS ((tree));
+extern tree get_vtbl_decl_for_binfo PARAMS ((tree));
/* in cvt.c */
extern tree convert_to_reference PARAMS ((tree, tree, int, int, tree));
extern int namespace_bindings_p PARAMS ((void));
extern void keep_next_level PARAMS ((int));
extern int kept_level_p PARAMS ((void));
-extern void declare_pseudo_global_level PARAMS ((void));
-extern int pseudo_global_level_p PARAMS ((void));
+extern int template_parm_scope_p PARAMS ((void));
extern void set_class_shadows PARAMS ((tree));
-extern void pushlevel PARAMS ((int));
+extern void begin_scope PARAMS ((scope_kind));
+extern void finish_scope PARAMS ((void));
extern void note_level_for_for PARAMS ((void));
extern void resume_level PARAMS ((struct binding_level *));
extern void delete_block PARAMS ((tree));
extern tree unqualified_namespace_lookup PARAMS ((tree, int, tree *));
extern int lookup_using_namespace PARAMS ((tree, tree, tree, tree, int, tree *));
extern int qualified_lookup_using_namespace PARAMS ((tree, tree, tree, int));
-extern tree auto_function PARAMS ((tree, tree));
+extern tree build_library_fn PARAMS ((tree, tree));
+extern tree build_cp_library_fn PARAMS ((tree, tree));
+extern tree build_library_fn_ptr PARAMS ((const char *, tree));
+extern tree build_cp_library_fn_ptr PARAMS ((const char *, tree));
+extern tree push_library_fn PARAMS ((tree, tree));
+extern tree push_cp_library_fn PARAMS ((tree, tree));
+extern tree push_void_library_fn PARAMS ((tree, tree));
+extern tree push_throw_library_fn PARAMS ((tree, tree));
extern void init_decl_processing PARAMS ((void));
extern int init_type_desc PARAMS ((void));
-extern tree define_function PARAMS ((const char *, tree,
- void (*) (tree),
- const char *));
extern tree check_tag_decl PARAMS ((tree));
extern void shadow_tag PARAMS ((tree));
extern tree groktypename PARAMS ((tree));
extern void expand_start_early_try_stmts PARAMS ((void));
extern void store_parm_decls PARAMS ((void));
extern void store_return_init PARAMS ((tree));
-extern tree finish_function PARAMS ((int, int));
+extern tree finish_function PARAMS ((int));
extern tree start_method PARAMS ((tree, tree, tree));
extern tree finish_method PARAMS ((tree));
extern void hack_incomplete_structures PARAMS ((tree));
extern tree maybe_build_cleanup PARAMS ((tree));
extern void cplus_expand_expr_stmt PARAMS ((tree));
extern void finish_stmt PARAMS ((void));
-extern int in_function_p PARAMS ((void));
extern void replace_defarg PARAMS ((tree, tree));
extern void print_other_binding_stack PARAMS ((struct binding_level *));
-extern void revert_static_member_fn PARAMS ((tree*, tree*, tree*));
+extern void revert_static_member_fn PARAMS ((tree));
extern void fixup_anonymous_aggr PARAMS ((tree));
extern int check_static_variable_definition PARAMS ((tree, tree));
extern tree compute_array_index_type PARAMS ((tree, tree));
extern int nonstatic_local_decl_p PARAMS ((tree));
extern tree declare_global_var PARAMS ((tree, tree));
extern void register_dtor_fn PARAMS ((tree));
+extern tmpl_spec_kind current_tmpl_spec_kind PARAMS ((int));
/* in decl2.c */
extern void init_decl2 PARAMS ((void));
extern tree constructor_name_full PARAMS ((tree));
extern tree constructor_name PARAMS ((tree));
extern void setup_vtbl_ptr PARAMS ((void));
-extern void mark_inline_for_output PARAMS ((tree));
+extern void defer_fn PARAMS ((tree));
extern tree get_temp_name PARAMS ((tree, int));
extern void finish_anon_union PARAMS ((tree));
extern tree finish_table PARAMS ((tree, tree, tree, int));
extern tree coerce_new_type PARAMS ((tree));
extern tree coerce_delete_type PARAMS ((tree));
extern void comdat_linkage PARAMS ((tree));
-extern void import_export_class PARAMS ((tree));
extern void import_export_vtable PARAMS ((tree, tree, int));
extern void import_export_decl PARAMS ((tree));
extern tree build_cleanup PARAMS ((tree));
extern void expand_exception_blocks PARAMS ((void));
extern tree build_throw PARAMS ((tree));
extern void mark_all_runtime_matches PARAMS ((void));
+extern int nothrow_libfn_p PARAMS ((tree));
/* in expr.c */
extern void init_cplus_expand PARAMS ((void));
extern int is_friend PARAMS ((tree, tree));
extern void make_friend_class PARAMS ((tree, tree));
extern void add_friend PARAMS ((tree, tree));
-extern void add_friends PARAMS ((tree, tree, tree));
extern tree do_friend PARAMS ((tree, tree, tree, tree, tree, enum overload_flags, tree, int));
/* in init.c */
extern void init_init_processing PARAMS ((void));
-extern tree emit_base_init PARAMS ((tree));
-extern void check_base_init PARAMS ((tree));
+extern void emit_base_init PARAMS ((tree));
extern void expand_member_init PARAMS ((tree, tree, tree));
extern tree build_aggr_init PARAMS ((tree, tree, int));
-extern int is_aggr_typedef PARAMS ((tree, int));
extern int is_aggr_type PARAMS ((tree, int));
extern tree get_aggr_from_typedef PARAMS ((tree, int));
extern tree get_type_value PARAMS ((tree));
extern tree resolve_offset_ref PARAMS ((tree));
extern tree decl_constant_value PARAMS ((tree));
extern tree build_new PARAMS ((tree, tree, tree, int));
-extern tree build_new_1 PARAMS ((tree));
extern tree build_vec_init PARAMS ((tree, tree, tree, tree, int));
extern tree build_x_delete PARAMS ((tree, int, tree));
extern tree build_delete PARAMS ((tree, tree, tree, int, int));
extern void begin_init_stmts PARAMS ((tree *, tree *));
extern tree finish_init_stmts PARAMS ((tree, tree));
extern void initialize_vtbl_ptrs PARAMS ((tree, tree));
+extern tree build_java_class_ref PARAMS ((tree));
/* in input.c */
extern void yyungetc PARAMS ((int, int));
extern void reinit_parse_for_method PARAMS ((int, tree));
extern void reinit_parse_for_block PARAMS ((int, struct obstack *));
-extern tree cons_up_default_function PARAMS ((tree, tree, int));
extern void check_for_missing_semicolon PARAMS ((tree));
extern void note_got_semicolon PARAMS ((tree));
extern void note_list_got_semicolon PARAMS ((tree));
extern int is_rid PARAMS ((tree));
extern tree build_lang_decl PARAMS ((enum tree_code, tree, tree));
extern void retrofit_lang_decl PARAMS ((tree));
+extern tree copy_decl PARAMS ((tree));
extern void copy_lang_decl PARAMS ((tree));
extern tree cp_make_lang_type PARAMS ((enum tree_code));
extern tree make_aggr_type PARAMS ((enum tree_code));
extern void emit_thunk PARAMS ((tree));
extern void synthesize_method PARAMS ((tree));
extern tree get_id_2 PARAMS ((const char *, tree));
+extern tree implicitly_declare_fn PARAMS ((special_function_kind, tree, int));
/* In optimize.c */
extern void optimize_function PARAMS ((tree));
extern void mark_class_instantiated PARAMS ((tree, int));
extern void do_decl_instantiation PARAMS ((tree, tree, tree));
extern void do_type_instantiation PARAMS ((tree, tree));
-extern tree instantiate_decl PARAMS ((tree));
+extern tree instantiate_decl PARAMS ((tree, int));
extern tree get_bindings PARAMS ((tree, tree, tree));
extern void add_tree PARAMS ((tree));
extern void add_maybe_template PARAMS ((tree, tree));
tree (*) (tree, void *),
void *));
extern tree dfs_unmark PARAMS ((tree, void *));
-extern tree dfs_vbase_unmark PARAMS ((tree, void *));
extern tree dfs_vtable_path_unmark PARAMS ((tree, void *));
extern tree markedp PARAMS ((tree, void *));
extern tree unmarkedp PARAMS ((tree, void *));
extern tree dfs_skip_nonprimary_vbases_markedp PARAMS ((tree, void *));
extern tree dfs_unmarked_real_bases_queue_p PARAMS ((tree, void *));
extern tree dfs_marked_real_bases_queue_p PARAMS ((tree, void *));
-extern tree dfs_vtable_path_unmarked_real_bases_queue_p
- PARAMS ((tree, void *));
-extern tree dfs_vtable_path_marked_real_bases_queue_p
- PARAMS ((tree, void *));
extern tree dfs_skip_vbases PARAMS ((tree, void *));
-extern void mark_primary_bases PARAMS ((tree));
+extern tree marked_vtable_pathp PARAMS ((tree, void *));
+extern tree unmarked_vtable_pathp PARAMS ((tree, void *));
extern tree convert_pointer_to_vbase PARAMS ((tree, tree));
extern tree find_vbase_instance PARAMS ((tree, tree));
extern tree finish_label_address_expr PARAMS ((tree));
extern tree finish_unary_op_expr PARAMS ((enum tree_code, tree));
extern tree finish_id_expr PARAMS ((tree));
-extern void deferred_type_access_control PARAMS ((void));
-extern void initial_deferred_type_access_control PARAMS ((tree));
-extern int begin_function_definition PARAMS ((tree, tree, tree));
+extern void save_type_access_control PARAMS ((tree));
+extern void decl_type_access_control PARAMS ((tree));
+extern int begin_function_definition PARAMS ((tree, tree));
extern tree begin_constructor_declarator PARAMS ((tree, tree));
extern tree finish_declarator PARAMS ((tree, tree, tree, tree, int));
extern void finish_translation_unit PARAMS ((void));
extern tree break_out_target_exprs PARAMS ((tree));
extern tree get_type_decl PARAMS ((tree));
extern tree vec_binfo_member PARAMS ((tree, tree));
-extern tree hack_decl_function_context PARAMS ((tree));
extern tree decl_namespace_context PARAMS ((tree));
extern tree lvalue_type PARAMS ((tree));
extern tree error_type PARAMS ((tree));
extern tree complete_type PARAMS ((tree));
extern tree complete_type_or_else PARAMS ((tree, tree));
extern int type_unknown_p PARAMS ((tree));
-extern int fntype_p PARAMS ((tree));
extern tree commonparms PARAMS ((tree, tree));
extern tree original_type PARAMS ((tree));
extern tree common_type PARAMS ((tree, tree));
extern tree convert_arguments PARAMS ((tree, tree, tree, int));
extern tree build_x_binary_op PARAMS ((enum tree_code, tree, tree));
extern tree build_binary_op PARAMS ((enum tree_code, tree, tree));
-extern tree build_binary_op_nodefault PARAMS ((enum tree_code, tree, tree, enum tree_code));
extern tree build_x_unary_op PARAMS ((enum tree_code, tree));
extern tree build_unary_op PARAMS ((enum tree_code, tree, int));
extern tree unary_complex_lvalue PARAMS ((enum tree_code, tree));
extern tree build_c_cast PARAMS ((tree, tree));
extern tree build_x_modify_expr PARAMS ((tree, enum tree_code, tree));
extern tree build_modify_expr PARAMS ((tree, enum tree_code, tree));
+extern tree dubious_conversion_warnings PARAMS ((tree, tree, const char *, tree, int));
extern tree convert_for_initialization PARAMS ((tree, tree, tree, int, const char *, tree, int));
extern void c_expand_asm_operands PARAMS ((tree, tree, tree, tree, int, char *, int));
extern void c_expand_return PARAMS ((tree));