diff options
author | Jason Merrill <jason@redhat.com> | 2015-10-08 12:14:03 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-10-08 12:14:03 -0400 |
commit | 338976c2341aa9e89007338976546b9d907619db (patch) | |
tree | f6a4b1292bd20695b9f926869a24c5093a5ff86b /gcc/cp/typeck2.c | |
parent | afd7acb2c95fd081d7fc2a7052325bdc2d309157 (diff) | |
download | gcc-338976c2341aa9e89007338976546b9d907619db.zip gcc-338976c2341aa9e89007338976546b9d907619db.tar.gz gcc-338976c2341aa9e89007338976546b9d907619db.tar.bz2 |
cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
* cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
* init.c (get_nsdmi): Use it.
* typeck2.c (massage_init_elt): Use it.
From-SVN: r228606
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 1d106c7..2c9143e 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1208,8 +1208,7 @@ massage_init_elt (tree type, tree init, tsubst_flags_t complain) { init = digest_init_r (type, init, true, LOOKUP_IMPLICIT, complain); /* Strip a simple TARGET_EXPR when we know this is an initializer. */ - if (TREE_CODE (init) == TARGET_EXPR - && !VOID_TYPE_P (TREE_TYPE (TARGET_EXPR_INITIAL (init)))) + if (SIMPLE_TARGET_EXPR_P (init)) init = TARGET_EXPR_INITIAL (init); /* When we defer constant folding within a statement, we may want to defer this folding as well. */ |