public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dodji at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/51477] [c++0x] ICE with initialization of invalid non-static data member
Date: Tue, 13 Dec 2011 22:52:00 -0000	[thread overview]
Message-ID: <bug-51477-4-SQQcLJVZAM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51477-4@http.gcc.gnu.org/bugzilla/>

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


  parent reply	other threads:[~2011-12-13 22:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08 23:46 [Bug c++/51477] New: " reichelt at gcc dot gnu.org
2011-12-13 15:01 ` [Bug c++/51477] " dodji at gcc dot gnu.org
2011-12-13 21:55 ` dodji at gcc dot gnu.org
2011-12-13 22:52 ` dodji at gcc dot gnu.org [this message]
2011-12-13 22:55 ` dodji at gcc dot gnu.org
2011-12-19  9:48 ` dodji at gcc dot gnu.org
2011-12-19 10:11 ` dodji at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-51477-4-SQQcLJVZAM@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).