This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
- From: "dodji at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Dec 2011 22:54:30 +0000
- Subject: [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
- Auto-submitted: auto-generated
- References: <bug-51475-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51475
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dodji at gcc dot gnu.org
--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-13 22:54:30 UTC ---
I can't reproduce this with trunk r182308. Here is what I get:
$ cat -n test-PR51475.cc
1 #include <initializer_list>
2
3 struct A
4 {
5 A(int*);
6 };
7
8 struct B
9 {
10 const std::initializer_list<A>& x;
11 };
12
13 B b = {{1}};
$ ./cc1plus -quiet -std=c++11 -I ../../libstdc++-v3/libsupc++/
-I../x86_64-unknown-linux-gnu/libstdc++-v3/include/
-I../x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/
test-PR51477.cc
test-PR51477.cc:13:11: erreur: invalid conversion from â<brace-enclosed
initializer list>â to âconst std::initializer_list<A>&â [-fpermissive]
test-PR51477.cc:13:11: erreur: cannot convert â{1}â from type â<brace-enclosed
initializer list>â to type âconst std::initializer_list<A>&â
$