diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2015-06-09 14:59:08 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2015-06-09 14:59:08 +0000 |
commit | ebcf592c841f47aa38ce0a9d95b4f04af975b0ac (patch) | |
tree | 24ff899bb2363b98e2d5dd7f473d28c8b6cd0906 /gcc/cp/init.c | |
parent | a0e4b207defe4bb8844f86ebab30aa2ca8de25d1 (diff) | |
download | gcc-ebcf592c841f47aa38ce0a9d95b4f04af975b0ac.zip gcc-ebcf592c841f47aa38ce0a9d95b4f04af975b0ac.tar.gz gcc-ebcf592c841f47aa38ce0a9d95b4f04af975b0ac.tar.bz2 |
re PR c++/65815 (brace elision doesn't work in NSDMI)
/cp
2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65815
* typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
* init.c (expand_default_init): Likewise.
/testsuite
2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65815
* g++.dg/cpp0x/nsdmi-aggr1.C: New.
* g++.dg/cpp0x/mem-init-aggr1.C: Likewise.
From-SVN: r224286
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index aad3b44..ef4f0ff 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1614,7 +1614,10 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags, && CP_AGGREGATE_TYPE_P (type)) /* A brace-enclosed initializer for an aggregate. In C++0x this can happen for direct-initialization, too. */ - init = digest_init (type, init, complain); + { + init = reshape_init (type, init, complain); + init = digest_init (type, init, complain); + } /* A CONSTRUCTOR of the target's type is a previously digested initializer, whether that happened just above or in |