public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29043]  New: Constructor for POD type with const member without member initializer accepted
@ 2006-09-12 21:02 amylaar at gcc dot gnu dot org
  2006-09-13  3:00 ` [Bug c++/29043] " fang at csl dot cornell dot edu
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-09-12 21:02 UTC (permalink / raw)
  To: gcc-bugs

The following C++ code should not compile:

class C
{
  C() { }
  struct s {
    const int i;
  };
};


The C++ standard clause 12.6.2 ; 4 says that for each non-static data
member of a POD class type containing a member of a const-qualified type, there
must be a member initialiser, or else the program is ill-formed.


-- 
           Summary: Constructor for POD type with const member without
                    member initializer accepted
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <bug-29043-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-11-12 14:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-12 21:02 [Bug c++/29043] New: Constructor for POD type with const member without member initializer accepted amylaar at gcc dot gnu dot org
2006-09-13  3:00 ` [Bug c++/29043] " fang at csl dot cornell dot edu
2006-09-13  9:23 ` andrew dot stubbs at st dot com
2006-09-13 16:10 ` bangerth at dealii dot org
2010-04-19 20:03 ` fabien dot chene at gmail dot com
2010-04-20 22:47 ` fabien dot chene at gmail dot com
2010-04-21  9:46 ` redi at gcc dot gnu dot org
2010-04-28  0:03 ` jason at gcc dot gnu dot org
     [not found] <bug-29043-4@http.gcc.gnu.org/bugzilla/>
2010-11-12 14:47 ` fabien.chene at gmail 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).