diff options
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 430ba30536a..06c079e41be 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1182,7 +1182,7 @@ digest_init_flags (tree type, tree init, int flags, tsubst_flags_t complain) /* Process the initializer INIT for an NSDMI DECL (a FIELD_DECL). */ tree -digest_nsdmi_init (tree decl, tree init) +digest_nsdmi_init (tree decl, tree init, tsubst_flags_t complain) { gcc_assert (TREE_CODE (decl) == FIELD_DECL); @@ -1192,8 +1192,8 @@ digest_nsdmi_init (tree decl, tree init) flags = LOOKUP_NORMAL; if (BRACE_ENCLOSED_INITIALIZER_P (init) && CP_AGGREGATE_TYPE_P (type)) - init = reshape_init (type, init, tf_warning_or_error); - init = digest_init_flags (type, init, flags, tf_warning_or_error); + init = reshape_init (type, init, complain); + init = digest_init_flags (type, init, flags, complain); if (TREE_CODE (init) == TARGET_EXPR) /* This represents the whole initialization. */ TARGET_EXPR_DIRECT_INIT_P (init) = true; @@ -1427,7 +1427,7 @@ process_init_constructor_record (tree type, tree init, goto restart; } /* C++14 aggregate NSDMI. */ - next = get_nsdmi (field, /*ctor*/false); + next = get_nsdmi (field, /*ctor*/false, complain); } else if (type_build_ctor_call (TREE_TYPE (field))) { @@ -1525,7 +1525,8 @@ process_init_constructor_union (tree type, tree init, { CONSTRUCTOR_APPEND_ELT (CONSTRUCTOR_ELTS (init), field, - get_nsdmi (field, /*in_ctor=*/false)); + get_nsdmi (field, /*in_ctor=*/false, + complain)); break; } } |