This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++] Remove some unneeded bitfields
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 21 Sep 2004 16:38:29 +0100
- Subject: [C++] Remove some unneeded bitfields
- Organization: Codesourcery LLC
This patch removes some bitfields that were either unused, or mirrored
the NULL/non-NULL state of another field.
booted & tested on i686-pc-linux-gnu.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (struct lang_type_header): Remove
uses_multiple_inheritance field.
(TYPE_USES_MULTIPLE_INHERITANCE): Remove.
(TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
(TYPE_USES_VIRTUAL_BASECLASSES): Remove.
(DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
(TYPE_CONTAINS_VPTR_P): Likewise.
* call.c (add_template_candidate_real): Use
CLASSTYPE_VBASECLASSES.
(build_special_member_call): Likewise.
* class.c (finish_struct_bits): Remove
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
bookkeeping.
(check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
(create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
bookkeeping.
(build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
(accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
Likewise.
* decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
bookkeeping.
(cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
* decl2.c (maybe_retrofit_in_chrg): Likewise.
* init.c (expand_member, push_base_cleanups): Likewise.
* pt.c (instantiate_class_template): Remove
TYPE_USES_MULTIPLE_INHERITANCE,
TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
bookkeeping.
* ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
check.
* typeck2.c (process_init_constructor): Replace some sorrys with
asserts.
Index: cp/call.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.508
diff -c -3 -p -r1.508 call.c
*** cp/call.c 18 Sep 2004 17:23:58 -0000 1.508
--- cp/call.c 21 Sep 2004 15:30:49 -0000
*************** add_template_candidate_real (struct z_ca
*** 2179,2185 ****
if ((DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (tmpl)
|| DECL_BASE_CONSTRUCTOR_P (tmpl))
! && TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (tmpl)))
args_without_in_chrg = TREE_CHAIN (args_without_in_chrg);
i = fn_type_unification (tmpl, explicit_targs, targs,
--- 2179,2185 ----
if ((DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (tmpl)
|| DECL_BASE_CONSTRUCTOR_P (tmpl))
! && CLASSTYPE_VBASECLASSES (DECL_CONTEXT (tmpl)))
args_without_in_chrg = TREE_CHAIN (args_without_in_chrg);
i = fn_type_unification (tmpl, explicit_targs, targs,
*************** build_special_member_call (tree instance
*** 5052,5058 ****
the subobject. */
if ((name == base_ctor_identifier
|| name == base_dtor_identifier)
! && TYPE_USES_VIRTUAL_BASECLASSES (class_type))
{
tree vtt;
tree sub_vtt;
--- 5052,5058 ----
the subobject. */
if ((name == base_ctor_identifier
|| name == base_dtor_identifier)
! && CLASSTYPE_VBASECLASSES (class_type))
{
tree vtt;
tree sub_vtt;
Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.675
diff -c -3 -p -r1.675 class.c
*** cp/class.c 18 Sep 2004 17:23:58 -0000 1.675
--- cp/class.c 21 Sep 2004 15:31:06 -0000
*************** finish_struct_bits (tree t)
*** 1405,1415 ****
TYPE_HAS_NONTRIVIAL_DESTRUCTOR (variants)
= TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t);
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (variants)
- = TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (t);
TYPE_POLYMORPHIC_P (variants) = TYPE_POLYMORPHIC_P (t);
- TYPE_USES_VIRTUAL_BASECLASSES (variants)
- = TYPE_USES_VIRTUAL_BASECLASSES (t);
TYPE_BINFO (variants) = TYPE_BINFO (t);
--- 1405,1411 ----
*************** check_bases_and_members (tree t)
*** 4126,4140 ****
/* Do some bookkeeping that will guide the generation of implicitly
declared member functions. */
TYPE_HAS_COMPLEX_INIT_REF (t)
! |= (TYPE_HAS_INIT_REF (t)
! || TYPE_USES_VIRTUAL_BASECLASSES (t)
! || TYPE_POLYMORPHIC_P (t));
TYPE_NEEDS_CONSTRUCTING (t)
! |= (TYPE_HAS_CONSTRUCTOR (t)
! || TYPE_USES_VIRTUAL_BASECLASSES (t)
! || TYPE_POLYMORPHIC_P (t));
! CLASSTYPE_NON_AGGREGATE (t) |= (TYPE_HAS_CONSTRUCTOR (t)
! || TYPE_POLYMORPHIC_P (t));
CLASSTYPE_NON_POD_P (t)
|= (CLASSTYPE_NON_AGGREGATE (t) || TYPE_HAS_DESTRUCTOR (t)
|| TYPE_HAS_ASSIGN_REF (t));
--- 4122,4132 ----
/* Do some bookkeeping that will guide the generation of implicitly
declared member functions. */
TYPE_HAS_COMPLEX_INIT_REF (t)
! |= (TYPE_HAS_INIT_REF (t) || TYPE_CONTAINS_VPTR_P (t));
TYPE_NEEDS_CONSTRUCTING (t)
! |= (TYPE_HAS_CONSTRUCTOR (t) || TYPE_CONTAINS_VPTR_P (t));
! CLASSTYPE_NON_AGGREGATE (t)
! |= (TYPE_HAS_CONSTRUCTOR (t) || TYPE_POLYMORPHIC_P (t));
CLASSTYPE_NON_POD_P (t)
|= (CLASSTYPE_NON_AGGREGATE (t) || TYPE_HAS_DESTRUCTOR (t)
|| TYPE_HAS_ASSIGN_REF (t));
*************** create_vtable_ptr (tree t, tree* virtual
*** 4229,4241 ****
/* This class is non-empty. */
CLASSTYPE_EMPTY_P (t) = 0;
- if (BINFO_N_BASE_BINFOS (TYPE_BINFO (t)))
- /* If there were any baseclasses, they can't possibly be at
- offset zero any more, because that's where the vtable
- pointer is. So, converting to a base class is going to
- take work. */
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (t) = 1;
-
return field;
}
--- 4221,4226 ----
*************** build_vtt_inits (tree binfo, tree t, tre
*** 6780,6786 ****
int top_level_p = same_type_p (TREE_TYPE (binfo), t);
/* We only need VTTs for subobjects with virtual bases. */
! if (!TYPE_USES_VIRTUAL_BASECLASSES (BINFO_TYPE (binfo)))
return inits;
/* We need to use a construction vtable if this is not the primary
--- 6765,6771 ----
int top_level_p = same_type_p (TREE_TYPE (binfo), t);
/* We only need VTTs for subobjects with virtual bases. */
! if (!CLASSTYPE_VBASECLASSES (BINFO_TYPE (binfo)))
return inits;
/* We need to use a construction vtable if this is not the primary
*************** dfs_build_secondary_vptr_vtt_inits (tree
*** 6897,6903 ****
/* If BINFO has virtual bases or is reachable via a virtual path
from T, it'll have a secondary vptr. */
! if (!TYPE_USES_VIRTUAL_BASECLASSES (BINFO_TYPE (binfo))
&& !binfo_via_virtual (binfo, t))
return NULL_TREE;
--- 6882,6888 ----
/* If BINFO has virtual bases or is reachable via a virtual path
from T, it'll have a secondary vptr. */
! if (!CLASSTYPE_VBASECLASSES (BINFO_TYPE (binfo))
&& !binfo_via_virtual (binfo, t))
return NULL_TREE;
*************** accumulate_vtbl_inits (tree binfo,
*** 7052,7058 ****
/* If we're building a construction vtable, we're not interested in
subobjects that don't require construction vtables. */
if (ctor_vtbl_p
! && !TYPE_USES_VIRTUAL_BASECLASSES (BINFO_TYPE (binfo))
&& !binfo_via_virtual (orig_binfo, BINFO_TYPE (rtti_binfo)))
return;
--- 7037,7043 ----
/* If we're building a construction vtable, we're not interested in
subobjects that don't require construction vtables. */
if (ctor_vtbl_p
! && !CLASSTYPE_VBASECLASSES (BINFO_TYPE (binfo))
&& !binfo_via_virtual (orig_binfo, BINFO_TYPE (rtti_binfo)))
return;
*************** build_vbase_offset_vtbl_entries (tree bi
*** 7411,7417 ****
/* If there are no virtual baseclasses, then there is nothing to
do. */
! if (!TYPE_USES_VIRTUAL_BASECLASSES (BINFO_TYPE (binfo)))
return;
t = vid->derived;
--- 7396,7402 ----
/* If there are no virtual baseclasses, then there is nothing to
do. */
! if (!CLASSTYPE_VBASECLASSES (BINFO_TYPE (binfo)))
return;
t = vid->derived;
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1049
diff -c -3 -p -r1.1049 cp-tree.h
*** cp/cp-tree.h 16 Sep 2004 09:53:34 -0000 1.1049
--- cp/cp-tree.h 21 Sep 2004 15:31:18 -0000
*************** struct diagnostic_context;
*** 53,59 ****
TEMPLATE_PARMS_FOR_INLINE.
DELETE_EXPR_USE_VEC (in DELETE_EXPR).
(TREE_CALLS_NEW) (in _EXPR or _REF) (commented-out).
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (in _TYPE).
ICS_ELLIPSIS_FLAG (in _CONV)
DECL_INITIALIZED_P (in VAR_DECL)
2: IDENTIFIER_OPNAME_P (in IDENTIFIER_NODE)
--- 53,58 ----
*************** struct diagnostic_context;
*** 61,68 ****
ICS_THIS_FLAG (in _CONV)
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (in VAR_DECL)
STATEMENT_LIST_TRY_BLOCK (in STATEMENT_LIST)
! 3: TYPE_USES_VIRTUAL_BASECLASSES (in a class TYPE).
! (TREE_REFERENCE_EXPR) (in NON_LVALUE_EXPR) (commented-out).
ICS_BAD_FLAG (in _CONV)
FN_TRY_BLOCK_P (in TRY_BLOCK)
IDENTIFIER_CTOR_OR_DTOR_P (in IDENTIFIER_NODE)
--- 60,66 ----
ICS_THIS_FLAG (in _CONV)
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (in VAR_DECL)
STATEMENT_LIST_TRY_BLOCK (in STATEMENT_LIST)
! 3: (TREE_REFERENCE_EXPR) (in NON_LVALUE_EXPR) (commented-out).
ICS_BAD_FLAG (in _CONV)
FN_TRY_BLOCK_P (in TRY_BLOCK)
IDENTIFIER_CTOR_OR_DTOR_P (in IDENTIFIER_NODE)
*************** struct lang_type_header GTY(())
*** 960,969 ****
BOOL_BITFIELD has_type_conversion : 1;
BOOL_BITFIELD has_init_ref : 1;
BOOL_BITFIELD has_default_ctor : 1;
- BOOL_BITFIELD uses_multiple_inheritance : 1;
BOOL_BITFIELD const_needs_init : 1;
BOOL_BITFIELD ref_needs_init : 1;
BOOL_BITFIELD has_const_assign_ref : 1;
};
/* This structure provides additional information above and beyond
--- 958,968 ----
BOOL_BITFIELD has_type_conversion : 1;
BOOL_BITFIELD has_init_ref : 1;
BOOL_BITFIELD has_default_ctor : 1;
BOOL_BITFIELD const_needs_init : 1;
BOOL_BITFIELD ref_needs_init : 1;
BOOL_BITFIELD has_const_assign_ref : 1;
+
+ BOOL_BITFIELD spare : 1;
};
/* This structure provides additional information above and beyond
*************** struct lang_type GTY(())
*** 1159,1175 ****
convenient, don't reprocess any methods that appear in its redefinition. */
#define TYPE_REDEFINED(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->redefined)
- /* Nonzero means that this _CLASSTYPE (or one of its ancestors) uses
- multiple inheritance. If this is 0 for the root of a type
- hierarchy, then we can use more efficient search techniques. */
- #define TYPE_USES_MULTIPLE_INHERITANCE(NODE) \
- (LANG_TYPE_CLASS_CHECK (NODE)->h.uses_multiple_inheritance)
-
- /* Nonzero means that this _CLASSTYPE (or one of its ancestors) uses
- virtual base classes. If this is 0 for the root of a type
- hierarchy, then we can use more efficient search techniques. */
- #define TYPE_USES_VIRTUAL_BASECLASSES(NODE) (TREE_LANG_FLAG_3 (NODE))
-
/* The member function with which the vtable will be emitted:
the first noninline non-pure-virtual member function. NULL_TREE
if there is no key function or if this is a class template */
--- 1158,1163 ----
*************** struct lang_decl GTY(())
*** 1739,1745 ****
/* Nonzero if NODE is a FUNCTION_DECL for which a VTT parameter is
required. */
#define DECL_NEEDS_VTT_PARM_P(NODE) \
! (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (NODE)) \
&& (DECL_BASE_CONSTRUCTOR_P (NODE) \
|| DECL_BASE_DESTRUCTOR_P (NODE)))
--- 1727,1733 ----
/* Nonzero if NODE is a FUNCTION_DECL for which a VTT parameter is
required. */
#define DECL_NEEDS_VTT_PARM_P(NODE) \
! (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (NODE)) \
&& (DECL_BASE_CONSTRUCTOR_P (NODE) \
|| DECL_BASE_DESTRUCTOR_P (NODE)))
*************** struct lang_decl GTY(())
*** 2262,2272 ****
using a twos-complement negated operand. */
#define TREE_NEGATED_INT(NODE) TREE_LANG_FLAG_0 (INTEGER_CST_CHECK (NODE))
- /* Nonzero in any kind of _TYPE where conversions to base-classes may
- involve pointer arithmetic. If this is zero, then converting to
- a base-class never requires changing the value of the pointer. */
- #define TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P(NODE) (TREE_LANG_FLAG_1 (NODE))
-
/* [class.virtual]
A class that declares or inherits a virtual function is called a
--- 2250,2255 ----
*************** struct lang_decl GTY(())
*** 2275,2282 ****
/* Nonzero if this class has a virtual function table pointer. */
#define TYPE_CONTAINS_VPTR_P(NODE) \
! (TYPE_POLYMORPHIC_P (NODE) \
! || TYPE_USES_VIRTUAL_BASECLASSES (NODE))
/* This flag is true of a local VAR_DECL if it was declared in a for
statement, but we are no longer in the scope of the for. */
--- 2258,2264 ----
/* Nonzero if this class has a virtual function table pointer. */
#define TYPE_CONTAINS_VPTR_P(NODE) \
! (TYPE_POLYMORPHIC_P (NODE) || CLASSTYPE_VBASECLASSES (NODE))
/* This flag is true of a local VAR_DECL if it was declared in a for
statement, but we are no longer in the scope of the for. */
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1299
diff -c -3 -p -r1.1299 decl.c
*** cp/decl.c 21 Sep 2004 09:22:00 -0000 1.1299
--- cp/decl.c 21 Sep 2004 15:31:42 -0000
*************** xref_basetypes (tree ref, tree base_list
*** 9241,9251 ****
if (max_bases > 1)
{
- TYPE_USES_MULTIPLE_INHERITANCE (ref) = 1;
- /* If there is more than one non-empty they cannot be at the
- same address. */
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (ref) = 1;
-
if (TYPE_FOR_JAVA (ref))
error ("Java class '%T' cannot have multiple bases", ref);
}
--- 9241,9246 ----
*************** xref_basetypes (tree ref, tree base_list
*** 9253,9262 ****
if (max_vbases)
{
CLASSTYPE_VBASECLASSES (ref) = VEC_alloc (tree, max_vbases);
- TYPE_USES_VIRTUAL_BASECLASSES (ref) = 1;
- /* Converting to a virtual base class requires looking up the
- offset of the virtual base. */
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (ref) = 1;
if (TYPE_FOR_JAVA (ref))
error ("Java class '%T' cannot have virtual bases", ref);
--- 9248,9253 ----
*************** xref_basetypes (tree ref, tree base_list
*** 9309,9318 ****
TYPE_HAS_ARRAY_NEW_OPERATOR (ref)
|= TYPE_HAS_ARRAY_NEW_OPERATOR (basetype);
TYPE_GETS_DELETE (ref) |= TYPE_GETS_DELETE (basetype);
- TYPE_USES_MULTIPLE_INHERITANCE (ref)
- |= TYPE_USES_MULTIPLE_INHERITANCE (basetype);
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (ref)
- |= TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (basetype);
TYPE_HAS_CONVERSION (ref) |= TYPE_HAS_CONVERSION (basetype);
}
--- 9300,9305 ----
*************** cxx_maybe_build_cleanup (tree decl)
*** 10788,10793 ****
--- 10775,10782 ----
{
int flags = LOOKUP_NORMAL|LOOKUP_DESTRUCTOR;
tree rval;
+ bool has_vbases = (TREE_CODE (type) == RECORD_TYPE
+ && CLASSTYPE_VBASECLASSES (type));
if (TREE_CODE (type) == ARRAY_TYPE)
rval = decl;
*************** cxx_maybe_build_cleanup (tree decl)
*** 10798,10812 ****
}
/* Optimize for space over speed here. */
! if (! TYPE_USES_VIRTUAL_BASECLASSES (type)
! || flag_expensive_optimizations)
flags |= LOOKUP_NONVIRTUAL;
rval = build_delete (TREE_TYPE (rval), rval,
sfk_complete_destructor, flags, 0);
! if (TYPE_USES_VIRTUAL_BASECLASSES (type)
! && ! TYPE_HAS_DESTRUCTOR (type))
rval = build_compound_expr (rval, build_vbase_delete (type, decl));
return rval;
--- 10787,10799 ----
}
/* Optimize for space over speed here. */
! if (!has_vbases || flag_expensive_optimizations)
flags |= LOOKUP_NONVIRTUAL;
rval = build_delete (TREE_TYPE (rval), rval,
sfk_complete_destructor, flags, 0);
! if (has_vbases && !TYPE_HAS_DESTRUCTOR (type))
rval = build_compound_expr (rval, build_vbase_delete (type, decl));
return rval;
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.747
diff -c -3 -p -r1.747 decl2.c
*** cp/decl2.c 19 Sep 2004 23:17:52 -0000 1.747
--- cp/decl2.c 21 Sep 2004 15:31:48 -0000
*************** maybe_retrofit_in_chrg (tree fn)
*** 198,204 ****
/* We don't need an in-charge parameter for constructors that don't
have virtual bases. */
if (DECL_CONSTRUCTOR_P (fn)
! && !TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
return;
arg_types = TYPE_ARG_TYPES (TREE_TYPE (fn));
--- 198,204 ----
/* We don't need an in-charge parameter for constructors that don't
have virtual bases. */
if (DECL_CONSTRUCTOR_P (fn)
! && !CLASSTYPE_VBASECLASSES (DECL_CONTEXT (fn)))
return;
arg_types = TYPE_ARG_TYPES (TREE_TYPE (fn));
*************** maybe_retrofit_in_chrg (tree fn)
*** 209,215 ****
/* If this is a subobject constructor or destructor, our caller will
pass us a pointer to our VTT. */
! if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
{
parm = build_artificial_parm (vtt_parm_identifier, vtt_parm_type);
--- 209,215 ----
/* If this is a subobject constructor or destructor, our caller will
pass us a pointer to our VTT. */
! if (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (fn)))
{
parm = build_artificial_parm (vtt_parm_identifier, vtt_parm_type);
Index: cp/init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/init.c,v
retrieving revision 1.394
diff -c -3 -p -r1.394 init.c
*** cp/init.c 30 Aug 2004 15:28:44 -0000 1.394
--- cp/init.c 21 Sep 2004 15:31:54 -0000
*************** expand_member_init (tree name)
*** 1001,1007 ****
if (!direct_binfo && !virtual_binfo)
{
! if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
error ("type `%D' is not a direct or virtual base of `%T'",
name, current_class_type);
else
--- 1001,1007 ----
if (!direct_binfo && !virtual_binfo)
{
! if (CLASSTYPE_VBASECLASSES (current_class_type))
error ("type `%D' is not a direct or virtual base of `%T'",
name, current_class_type);
else
*************** push_base_cleanups (void)
*** 2855,2861 ****
VEC (tree) *vbases;
/* Run destructors for all virtual baseclasses. */
! if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
{
tree cond = (condition_conversion
(build2 (BIT_AND_EXPR, integer_type_node,
--- 2855,2861 ----
VEC (tree) *vbases;
/* Run destructors for all virtual baseclasses. */
! if (CLASSTYPE_VBASECLASSES (current_class_type))
{
tree cond = (condition_conversion
(build2 (BIT_AND_EXPR, integer_type_node,
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.925
diff -c -3 -p -r1.925 pt.c
*** cp/pt.c 21 Sep 2004 05:44:07 -0000 1.925
--- cp/pt.c 21 Sep 2004 15:32:19 -0000
*************** instantiate_class_template (tree type)
*** 5459,5470 ****
TYPE_HAS_CONST_INIT_REF (type) = TYPE_HAS_CONST_INIT_REF (pattern);
TYPE_HAS_DEFAULT_CONSTRUCTOR (type) = TYPE_HAS_DEFAULT_CONSTRUCTOR (pattern);
TYPE_HAS_CONVERSION (type) = TYPE_HAS_CONVERSION (pattern);
- TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (type)
- = TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (pattern);
- TYPE_USES_MULTIPLE_INHERITANCE (type)
- = TYPE_USES_MULTIPLE_INHERITANCE (pattern);
- TYPE_USES_VIRTUAL_BASECLASSES (type)
- = TYPE_USES_VIRTUAL_BASECLASSES (pattern);
TYPE_PACKED (type) = TYPE_PACKED (pattern);
TYPE_ALIGN (type) = TYPE_ALIGN (pattern);
TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (pattern);
--- 5459,5464 ----
Index: cp/ptree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ptree.c,v
retrieving revision 1.44
diff -c -3 -p -r1.44 ptree.c
*** cp/ptree.c 16 Jul 2004 01:15:42 -0000 1.44
--- cp/ptree.c 21 Sep 2004 15:32:20 -0000
*************** cxx_print_type (FILE *file, tree node, i
*** 123,130 ****
fputs (" delete[]", file);
if (TYPE_HAS_ASSIGN_REF (node))
fputs (" this=(X&)", file);
- if (TYPE_USES_MULTIPLE_INHERITANCE (node))
- fputs (" uses-multiple-inheritance", file);
if (TREE_CODE (node) == RECORD_TYPE)
{
--- 123,128 ----
Index: cp/typeck2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck2.c,v
retrieving revision 1.174
diff -c -3 -p -r1.174 typeck2.c
*** cp/typeck2.c 16 Sep 2004 09:53:40 -0000 1.174
--- cp/typeck2.c 21 Sep 2004 15:32:23 -0000
*************** process_init_constructor (tree type, tre
*** 947,969 ****
if (tail)
{
! if (TYPE_USES_VIRTUAL_BASECLASSES (type))
! {
! sorry ("initializer list for object of class with virtual base classes");
! return error_mark_node;
! }
!
! if (TYPE_BINFO (type) && BINFO_N_BASE_BINFOS (TYPE_BINFO (type)))
! {
! sorry ("initializer list for object of class with base classes");
! return error_mark_node;
! }
!
! if (TYPE_POLYMORPHIC_P (type))
! {
! sorry ("initializer list for object using virtual functions");
! return error_mark_node;
! }
}
for (field = TYPE_FIELDS (type); field;
--- 947,956 ----
if (tail)
{
! gcc_assert (!CLASSTYPE_VBASECLASSES (type));
! gcc_assert (!TYPE_BINFO (type)
! || !BINFO_N_BASE_BINFOS (TYPE_BINFO (type)));
! gcc_assert (!TYPE_POLYMORPHIC_P (type));
}
for (field = TYPE_FIELDS (type); field;