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++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list


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>&â
$


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