From: Jason Merrill Date: Fri, 5 Aug 2011 19:12:09 +0000 (-0400) Subject: init.c (perform_member_init): Always build_aggr_init for a class member with an expli... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a034826198b7711835f21307c6976926442f5b97;p=gcc.git init.c (perform_member_init): Always build_aggr_init for a class member with an explicit mem-initializer. * init.c (perform_member_init): Always build_aggr_init for a class member with an explicit mem-initializer. From-SVN: r177477 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3d9b3b6f71e..8eb6b74c3ce 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-05 Jason Merrill + * init.c (perform_member_init): Always build_aggr_init + for a class member with an explicit mem-initializer. + * pt.c (unify) [TEMPLATE_TYPE_PARM]: Allow VLA for C++0x 'auto'. 2011-08-04 Jakub Jelinek diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 31171cfa686..d9e475e79de 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -547,7 +547,8 @@ perform_member_init (tree member, tree init) finish_expr_stmt (init); } } - else if (type_build_ctor_call (type)) + else if (type_build_ctor_call (type) + || (init && CLASS_TYPE_P (strip_array_types (type)))) { if (TREE_CODE (type) == ARRAY_TYPE) {