[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 28 16:27:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-28 16:25:12 UTC ---
The code:
   array a { { "smile", 1 } };

Attempts to initialize array with { { "smile", 1 } }

which attempts to initialize pair[2] with { "smile", 1 }

which fairly obviously attemptes to initialize the first pair with "smile", and
the second pair with 1, neither of which is valid.

Why do you think the error is misattributed?



More information about the Gcc-bugs mailing list