public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/42844] const variable requires initializer / no explicitly declared default constructor
Date: Fri, 23 Sep 2011 21:36:00 -0000	[thread overview]
Message-ID: <bug-42844-4-5rGr8ahLJe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-42844-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> 2011-09-23 21:30:52 UTC ---
Author: jason
Date: Fri Sep 23 21:30:48 2011
New Revision: 179130

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179130
Log:
    Core 234 - allow const objects with no initializer or
    user-provided default constructor if the defaulted constructor
    initializes all the subobjects.
    PR c++/20039
    PR c++/42844
    * class.c (default_init_uninitialized_part): New.
    * cp-tree.h: Declare it.
    * decl.c (check_for_uninitialized_const_var): Use it.
    * init.c (perform_member_init): Likewise.
    (build_new_1): Likewise.
    * method.c (walk_field_subobs): Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/init/const8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/init.c
    trunk/gcc/cp/method.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C
    trunk/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C
    trunk/gcc/testsuite/g++.dg/init/pr20039.C
    trunk/gcc/testsuite/g++.dg/init/pr42844.C


  parent reply	other threads:[~2011-09-23 21:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-42844-4@http.gcc.gnu.org/bugzilla/>
2010-11-12 15:37 ` fabien.chene at gmail dot com
2011-09-23 21:36 ` jason at gcc dot gnu.org [this message]
2011-09-25 20:37 ` jason at gcc dot gnu.org
2014-02-20  8:44 ` potswa at mac dot com
2010-01-22 11:27 [Bug c++/42844] New: " mathieu dot malaterre at gmail dot com
2010-01-22 11:57 ` [Bug c++/42844] " redi at gcc dot gnu dot org
2010-01-22 12:27 ` redi at gcc dot gnu dot org
2010-01-22 15:56 ` pinskia at gcc dot gnu dot org
2010-01-22 15:57 ` pinskia at gcc dot gnu dot org
2010-03-30 11:40 ` fabien dot chene at gmail dot com
2010-03-30 11:44 ` dodji at redhat dot com
2010-03-30 11:51 ` fabien dot chene at gmail dot com
2010-03-30 11:56 ` redi at gcc dot gnu dot org
2010-03-30 14:11 ` fabien dot chene at gmail dot com
2010-03-30 16:47 ` fabien dot chene at gmail dot com
2010-04-12 20:45 ` fabien dot chene at gmail dot com
2010-04-20 22:49 ` fabien dot chene at gmail dot com
2010-04-27 18:56 ` jason at gcc dot gnu dot 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-42844-4-5rGr8ahLJe@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).