public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49132] New: [C++0x] Aggregate-initialization rejected for class with const data member
@ 2011-05-23 21:46 daniel.kruegler at googlemail dot com
  2011-05-23 22:37 ` [Bug c++/49132] [DR 178] " jason at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2011-05-23 21:46 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [C++0x] Aggregate-initialization rejected for class
                    with const data member
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com
                CC: jason@redhat.com


gcc 4.7.0 20110521 (experimental) in C++0x mode rejects the following code:

//---
struct A {
 const int m;
};

A a1 = {}; // #1
A a2{};    // #2
//---

The error messages at the lines marked with #1 and #2 are:

"error: uninitialized const member 'A::m'"

The code should be accepted, because the objects undergo
aggregate-initialization. The error message is incorrect, the objects are
initialized.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-06-26 17:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 21:46 [Bug c++/49132] New: [C++0x] Aggregate-initialization rejected for class with const data member daniel.kruegler at googlemail dot com
2011-05-23 22:37 ` [Bug c++/49132] [DR 178] " jason at gcc dot gnu.org
2011-05-23 22:37 ` [Bug c++/49132] [C++0x] " jason at gcc dot gnu.org
2011-05-23 22:40 ` [Bug c++/49132] [4.6/4.7 regression] " jason at gcc dot gnu.org
2011-05-23 22:43 ` [Bug c++/49132] [C++0x] " jason at gcc dot gnu.org
2011-05-23 22:48 ` [Bug c++/49132] " jason at gcc dot gnu.org
2011-05-24  0:42 ` [Bug c++/49132] [DR 178] " redi at gcc dot gnu.org
2011-11-16 13:55 ` fabien at gcc dot gnu.org
2014-06-24 18:41 ` paolo.carlini at oracle dot com
2014-06-25 14:28 ` paolo at gcc dot gnu.org
2014-06-25 14:29 ` paolo.carlini at oracle dot com
2014-06-26 17:00 ` paolo.carlini at oracle dot com

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).