summaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-07 18:09:55 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-07 18:09:55 +0000
commitffc5ad9bcb2f00b9527f939a557d99f70ae12a40 (patch)
tree5e6e09cee58eb9f9d7eacc47fb47f9ffd755b985 /gcc/cp/typeck2.c
parent5eca48ebf948560515b1c834b27ea32b07033f08 (diff)
downloadgcc-ffc5ad9bcb2f00b9527f939a557d99f70ae12a40.tar.gz
PR c++/80095
* call.c (build_over_call): Don't check cxx_dialect. * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor whether SUB is a CONSTRUCTOR. * init.c (build_new_1): Don't check cxx_dialect. * tree.c (replace_placeholders): Add a function comment. Return if not in C++14, or if the object isn't a (member of a) class. * typeck2.c (store_init_value): Don't check cxx_dialect nor whether TYPE is CLASS_TYPE_P. * g++.dg/cpp1y/nsdmi-aggr8.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index d1a393059a4..1f0eb454754 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -840,9 +840,8 @@ store_init_value (tree decl, tree init, vec<tree, va_gc>** cleanups, int flags)
}
value = cp_fully_fold (value);
- if (cxx_dialect >= cxx14 && CLASS_TYPE_P (strip_array_types (type)))
- /* Handle aggregate NSDMI in non-constant initializers, too. */
- value = replace_placeholders (value, decl);
+ /* Handle aggregate NSDMI in non-constant initializers, too. */
+ value = replace_placeholders (value, decl);
/* DECL may change value; purge caches. */
clear_cv_and_fold_caches ();