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++/20039] uninitialized const in `new' of `const struct' Date: Sun, 25 Sep 2011 20:46:00 -0000 [thread overview] Message-ID: <bug-20039-4-7kgpIVX82Y@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-20039-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20039 --- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-09-25 20:29:09 UTC --- Author: jason Date: Sun Sep 25 20:29:04 2011 New Revision: 179170 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179170 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: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/init/const8.C Modified: branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/class.c branches/gcc-4_6-branch/gcc/cp/cp-tree.h branches/gcc-4_6-branch/gcc/cp/decl.c branches/gcc-4_6-branch/gcc/cp/init.c branches/gcc-4_6-branch/gcc/cp/method.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/defaulted2.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/init/pr42844.C branches/gcc-4_6-branch/gcc/testsuite/lib/prune.exp
next prev parent reply other threads:[~2011-09-25 20:30 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-20039-4@http.gcc.gnu.org/bugzilla/> 2011-04-12 21:32 ` fabien at gcc dot gnu.org 2011-04-12 23:55 ` redi at gcc dot gnu.org 2011-05-09 21:10 ` fabien at gcc dot gnu.org 2011-09-23 21:37 ` jason at gcc dot gnu.org 2011-09-25 20:46 ` jason at gcc dot gnu.org [this message] [not found] <bug-20039-10087@http.gcc.gnu.org/bugzilla/> 2006-10-10 3:36 ` bangerth at dealii dot org 2005-02-18 1:05 [Bug c++/20039] New: " msadoghi at ca dot ibm dot com 2005-02-18 1:16 ` [Bug c++/20039] " pinskia 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-20039-4-7kgpIVX82Y@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: linkBe 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).