This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 May 2012 16:25:12 +0000
- Subject: [Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list
- Auto-submitted: auto-generated
- References: <bug-53494-4@http.gcc.gnu.org/bugzilla/>
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?