On 03/31/2015 01:22 PM, Marek Polacek wrote:
The user *should* have been using <initializer_list>. But responding to this
with an ICE isn't acceptable either.
We do reject wholly incompatible user-defined initializer_list: finish_struct
requires it be a template with a pointer field followed by an integer field,
and in this case it is, but convert_like_real assumes that the second integer
field has a size_type, so it initializes the length with that type. But as the
following testcase (which clang accepts) shows, it might be a different integer
type, and gimplifier doesn't like any non-trivial conversion in an assignment.
I think I'd prefer to enforce that the second integer is size_t, not
just an integer, so that the assumption in convert_like_real is correct.
Jason