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++/51477] [c++0x] ICE with initialization of invalid non-static data member


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51477

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-13 22:50:55 UTC ---
I can't reproduce the behaviour on recent builds from trunk.  E.g, on
r182308 I am getting:

$ 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]