public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91319] Designated initializer doesn't support direct-initialization Date: Wed, 30 Aug 2023 18:26:33 +0000 [thread overview] Message-ID: <bug-91319-4-WHUN8GIOiq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-91319-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91319 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:4a92205ef1da044eaf9490e61787836a3abe7d6c commit r14-3577-g4a92205ef1da044eaf9490e61787836a3abe7d6c Author: Marek Polacek <polacek@redhat.com> Date: Fri Aug 25 11:47:54 2023 -0400 c++: CWG 2359, wrong copy-init with designated init [PR91319] This CWG clarifies that designated initializer support direct-initialization. Just be careful what Note 2 in [dcl.init.aggr]/4.2 says: "If the initialization is by designated-initializer-clause, its form determines whether copy-initialization or direct-initialization is performed." Hence this patch sets CONSTRUCTOR_IS_DIRECT_INIT only when we are dealing with ".x{}", but not ".x = {}". PR c++/91319 gcc/cp/ChangeLog: * parser.cc (cp_parser_initializer_list): Set CONSTRUCTOR_IS_DIRECT_INIT when the designated initializer is of the .x{} form. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/desig30.C: New test.
next prev parent reply other threads:[~2023-08-30 18:26 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-91319-4@http.gcc.gnu.org/bugzilla/> 2021-03-15 17:22 ` mpolacek at gcc dot gnu.org 2021-03-15 17:23 ` mpolacek at gcc dot gnu.org 2023-03-23 13:39 ` ppalka at gcc dot gnu.org 2023-08-30 18:26 ` cvs-commit at gcc dot gnu.org [this message] 2023-08-30 18:27 ` mpolacek 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-91319-4-WHUN8GIOiq@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).