+2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
+
+ PR c++/43719
+ * decl.c (check_initializer): strip array type before checking for
+ uninitialized const or ref members.
+
2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
PR c++/43951
{
tree type = TREE_TYPE (decl);
tree init_code = NULL;
+ tree core_type;
/* Things that are going to be initialized need to have complete
type. */
check_for_uninitialized_const_var (decl);
return build_aggr_init_full_exprs (decl, init, flags);
}
- else if (MAYBE_CLASS_TYPE_P (type))
+ else if (MAYBE_CLASS_TYPE_P (core_type = strip_array_types (type)))
{
- tree core_type = strip_array_types (type);
-
- if (CLASSTYPE_READONLY_FIELDS_NEED_INIT (core_type))
- error ("structure %qD with uninitialized const members", decl);
- if (CLASSTYPE_REF_FIELDS_NEED_INIT (core_type))
- error ("structure %qD with uninitialized reference members", decl);
+ if (CLASSTYPE_READONLY_FIELDS_NEED_INIT (core_type)
+ || CLASSTYPE_REF_FIELDS_NEED_INIT (core_type))
+ diagnose_uninitialized_cst_or_ref_member (core_type, /*using_new=*/false,
+ /*complain=*/true);
check_for_uninitialized_const_var (decl);
}
+2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
+
+ PR c++/43719
+ * g++.dg/init/pr43719.C: New.
+ * g++.dg/anon-struct4.C: Adjust.
+
2010-05-10 Jakub Jelinek <jakub@redhat.com>
PR debug/44028