This is the mail archive of the gcc-bugs@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]

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


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?


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