This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH for c++/78345, ICE with lambda as array initializer


build_aggr_init was blithely passing most any initializer on to
build_vec_init, which saw a CONSTRUCTOR and assumed that it would be
of the right type, leading to an ICE.  Fixed by not taking the
INIT_EXPR shortcut if the CONSTRUCTOR has the wrong type.

That returned us to the GCC 6 state, where we would sometimes silently
accept a single expression used as an array initializer.  I think
that's a remnant of an extension that predates my work on the
compiler, and several places already reject that pattern, so let's
reject it here with a permerror.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: 78345.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]