PR c++/12883
* decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
From-SVN: r82333
+2004-05-27 Adam Nemet <anemet@lnxw.com>
+
+ PR c++/12883
+ * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
+ TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
+
2004-05-24 Geoffrey Keating <geoffk@apple.com>
* method.c (implicitly_declare_fn): Don't call defer_fn; abort
{
tree itype;
tree domain;
+ tree elt_type;
domain = build_index_type (maxindex);
TYPE_DOMAIN (type) = domain;
size of the array. */
if (! TYPE_DOMAIN (TYPE_MAIN_VARIANT (type)))
TYPE_DOMAIN (TYPE_MAIN_VARIANT (type)) = domain;
+
+ elt_type = TREE_TYPE (type);
+ TYPE_NEEDS_CONSTRUCTING (type)
+ = TYPE_NEEDS_CONSTRUCTING (TYPE_MAIN_VARIANT (elt_type));
+ TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+ = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TYPE_MAIN_VARIANT (elt_type));
}
/* Lay out the type now that we can get the real answer. */