On 10/14/2013 08:23 AM, Marek Polacek wrote:
We were ICEing on the attached testcase, because in check_narrowing,
for = {{}}, we wanted to check recursively the CONSTRUCTOR_ELTs,
even though init in this case has 0 CONSTRUCTOR_NELTS.  So I added
the check for CONSTRUCTOR_NELTS > 0.  Moreover, since empty scalar
initializers are forbidden in C FE, I think we should error out here
too.  (Complex type is considered as an arithmetic type as a GNU
extension and arithmetic types are scalar types.)

Empty scalar initializers are allowed in C++11, so we shouldn't give an error. Your initial patch from bugzilla is OK, with an appropriately adjusted testcase.

Jason

Reply via email to