Remove assert in reshape_init_r.

Asserting !BRACE_ENCLOSED_INITIALIZER_P seems pretty pointless, since
that checks for init_list_type_node, and a compound literal won't have
that type, nor will we see that type if we just checked that it's
something else.

	* decl.c (reshape_init_r): Remove assert.

From-SVN: r279771
This commit is contained in:
Marek Polacek 2019-12-30 16:07:33 +00:00 committed by Marek Polacek
parent 04e4997a56
commit a565076268
2 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2019-12-30 Marek Polacek <polacek@redhat.com>
* decl.c (reshape_init_r): Remove assert.
2019-12-30 Paolo Carlini <paolo.carlini@oracle.com>
* decl2.c (delete_sanity): Add location_t parameter and use

View file

@ -6408,7 +6408,6 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p,
else if (same_type_ignoring_top_level_qualifiers_p (type, init_type))
{
++d->cur;
gcc_assert (!BRACE_ENCLOSED_INITIALIZER_P (stripped_init));
return init;
}
else