[Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
dodji at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 13 22:56:00 GMT 2011
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>&’
$
More information about the Gcc-bugs
mailing list