diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7d4c947..c15cbfa 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6399,14 +6399,13 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p, by the front end. Here we have e.g. {.__pfn=0B, .__delta=0}, which is missing outermost braces. We should warn below, and one of the routines below will wrap it in additional { }. */; - /* For a nested compound literal, there is no need to reshape since - we called reshape_init in finish_compound_literal, before calling - digest_init. */ - else if (COMPOUND_LITERAL_P (stripped_init) - /* Similarly, a CONSTRUCTOR of the target's type is a - previously digested initializer. */ - || same_type_ignoring_top_level_qualifiers_p (type, - init_type)) + /* For a nested compound literal, proceed to specialized routines, + to handle initialization of arrays and similar. */ + else if (COMPOUND_LITERAL_P (stripped_init)) + gcc_assert (!BRACE_ENCLOSED_INITIALIZER_P (stripped_init)); + /* A CONSTRUCTOR of the target's type is a previously + digested initializer. */ + else if (same_type_ignoring_top_level_qualifiers_p (type, init_type)) { ++d->cur; gcc_assert (!BRACE_ENCLOSED_INITIALIZER_P (stripped_init)); |