OSDN Git Service

* cp-tre.h (finish_function): Change prototype.
[pf3gnuchains/gcc-fork.git] / gcc / cp / cp-tree.h
index 2342fd6..b556236 100644 (file)
@@ -55,8 +55,6 @@ Boston, MA 02111-1307, USA.  */
       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)
@@ -81,7 +79,7 @@ Boston, MA 02111-1307, USA.  */
    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.
 
@@ -112,10 +110,7 @@ Boston, MA 02111-1307, USA.  */
      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
@@ -133,6 +128,13 @@ Boston, MA 02111-1307, USA.  */
      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.  
 
@@ -394,10 +396,6 @@ struct tree_srcloc
   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)    \
@@ -523,7 +521,6 @@ enum cp_tree_index
     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,
@@ -541,6 +538,7 @@ enum cp_tree_index
     CPTI_VTBL_TYPE,
     CPTI_VTBL_PTR_TYPE,
     CPTI_STD,
+    CPTI_ABI,
     CPTI_TYPE_INFO_TYPE,
     CPTI_TINFO_DECL_ID,
     CPTI_TINFO_DECL_TYPE,
@@ -558,9 +556,13 @@ enum cp_tree_index
     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,
@@ -580,8 +582,6 @@ enum cp_tree_index
     CPTI_TERMINATE,
     CPTI_ATEXIT,
     CPTI_DSO_HANDLE,
-    CPTI_BAD_CAST,
-    CPTI_BAD_TYPEID,
     CPTI_DCAST,
 
     CPTI_MAX
@@ -611,7 +611,6 @@ extern tree cp_global_trees[CPTI_MAX];
 #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]
@@ -629,6 +628,7 @@ extern tree cp_global_trees[CPTI_MAX];
 #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]
@@ -652,10 +652,24 @@ extern tree cp_global_trees[CPTI_MAX];
 /* 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]
@@ -689,12 +703,6 @@ extern tree cp_global_trees[CPTI_MAX];
 /* 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]
 
@@ -1094,6 +1102,10 @@ extern int warn_extern_inline;
 
 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;
@@ -1160,6 +1172,12 @@ extern int flag_vtable_gc;
    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;
@@ -1309,11 +1327,14 @@ struct lang_type
   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;
@@ -1342,42 +1363,30 @@ struct lang_type
   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 *size_unit;
-
-  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;
 };
 
@@ -1394,9 +1403,7 @@ struct lang_type
 /* 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)
 
@@ -1404,9 +1411,15 @@ struct lang_type
    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.  */
@@ -1420,6 +1433,15 @@ struct lang_type
 #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)
@@ -1529,21 +1551,29 @@ struct lang_type
 #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 {};
@@ -1553,14 +1583,23 @@ struct lang_type
 
    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)))
@@ -1569,8 +1608,8 @@ struct lang_type
    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)
@@ -1596,14 +1635,6 @@ struct lang_type
 /* 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))
@@ -1665,9 +1696,7 @@ struct lang_type
 
    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'.  */
@@ -1677,29 +1706,20 @@ struct lang_type
 #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)
@@ -1817,7 +1837,7 @@ struct lang_decl_flags
   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;
@@ -1857,7 +1877,6 @@ struct lang_decl
 {
   struct lang_decl_flags decl_flags;
 
-  tree main_decl_variant;
   tree befriending_classes;
 
   /* In a FUNCTION_DECL, this is DECL_SAVED_TREE.  */
@@ -1919,6 +1938,10 @@ struct lang_decl
 #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
@@ -2058,18 +2081,15 @@ struct lang_decl
 /* 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,
@@ -2087,9 +2107,9 @@ struct lang_decl
 #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.  */
@@ -2126,7 +2146,6 @@ struct lang_decl
 
 #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
@@ -2217,7 +2236,6 @@ struct lang_decl
 #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)                     \
@@ -2336,6 +2354,8 @@ extern int flag_new_for_scope;
    && 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) \
@@ -2413,10 +2433,26 @@ extern int flag_new_for_scope;
 #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.  */
@@ -2668,7 +2704,7 @@ extern int flag_new_for_scope;
 #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
@@ -2866,21 +2902,23 @@ extern int flag_new_for_scope;
 
 /* 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 `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))))
 
@@ -3012,6 +3050,52 @@ typedef enum cp_lvalue_kind {
   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;
@@ -3061,6 +3145,7 @@ extern tree convert_and_check                     PARAMS ((tree, tree));
 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
@@ -3130,10 +3215,6 @@ extern int current_class_depth;
 /* 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.  */
 
@@ -3385,8 +3466,6 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
    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
@@ -3411,10 +3490,8 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
 #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)
@@ -3572,19 +3649,18 @@ extern tree build_vfield_ref                    PARAMS ((tree, tree));
 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));
@@ -3616,7 +3692,7 @@ extern void push_lang_context                     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));
@@ -3625,8 +3701,7 @@ extern void unreverse_member_declarations       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));
@@ -3651,10 +3726,10 @@ extern int toplevel_bindings_p                  PARAMS ((void));
 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));
@@ -3720,12 +3795,16 @@ extern tree namespace_ancestor                  PARAMS ((tree, 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));
@@ -3754,7 +3833,7 @@ extern int start_function                 PARAMS ((tree, tree, tree, int));
 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));
@@ -3762,10 +3841,9 @@ extern tree maybe_build_cleanup_and_delete       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));
@@ -3797,6 +3875,7 @@ extern int local_variable_p                     PARAMS ((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));
@@ -3822,7 +3901,7 @@ extern void cplus_decl_attributes         PARAMS ((tree, tree, tree));
 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));
@@ -3831,7 +3910,6 @@ extern void finish_builtin_type                   PARAMS ((tree, const char *,
 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));
@@ -3894,6 +3972,7 @@ extern void expand_end_eh_spec                    PARAMS ((tree, 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));
@@ -3910,11 +3989,9 @@ extern tree do_friend                            PARAMS ((tree, tree, tree, tree, tree, enum overload_fl
 
 /* 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));
@@ -3923,7 +4000,6 @@ extern tree build_offset_ref                      PARAMS ((tree, 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));
@@ -3933,6 +4009,7 @@ extern tree create_temporary_var                PARAMS ((tree));
 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 */
 
@@ -3958,7 +4035,6 @@ extern void restore_pending_input         PARAMS ((struct pending_input *));
 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));
@@ -3972,6 +4048,7 @@ extern int real_yylex                             PARAMS ((void));
 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));
@@ -4005,6 +4082,7 @@ extern tree make_thunk                            PARAMS ((tree, int, int));
 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));
@@ -4047,7 +4125,7 @@ extern int more_specialized                       PARAMS ((tree, tree, 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));
@@ -4129,7 +4207,6 @@ extern tree dfs_walk_real                      PARAMS ((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 *));
@@ -4137,12 +4214,9 @@ extern tree dfs_skip_nonprimary_vbases_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));
 
@@ -4325,7 +4399,6 @@ extern tree require_complete_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));
@@ -4375,6 +4448,7 @@ extern tree build_const_cast                      PARAMS ((tree, 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));