* init.c (perform_member_init): Check CLASS_TYPE_P.

From-SVN: r158822
This commit is contained in:
Jason Merrill 2010-04-27 21:45:00 -04:00 committed by Jason Merrill
parent a8ae19777a
commit 012e6a1e04
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2010-04-27 Jason Merrill <jason@redhat.com>
* init.c (perform_member_init): Check CLASS_TYPE_P.
2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
PR c++/29043

View File

@ -518,9 +518,11 @@ perform_member_init (tree member, tree init)
member, type);
core_type = strip_array_types (type);
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);
if (CLASS_TYPE_P (core_type)
&& (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);
}
else if (TREE_CODE (init) == TREE_LIST)
/* There was an explicit member initialization. Do some work