From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 795563858006; Wed, 15 Sep 2021 17:56:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 795563858006 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102050] Nonempty list-initialization rejects constructor with defaulted std::initializer_list Date: Wed, 15 Sep 2021 17:56:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 17:56:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102050 --- Comment #1 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:2ab5c3d5457f0d480c6423ee7ac52ce1f98592c9 commit r12-3555-g2ab5c3d5457f0d480c6423ee7ac52ce1f98592c9 Author: Patrick Palka Date: Wed Sep 15 13:54:53 2021 -0400 c++: default ctor that's also a list ctor [PR102050] In grok_special_member_properties we need to set TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR and TYPE_HAS_LIST_CTOR independently from each other because a constructor can be both a default and list constructor (as in the first testcase), or both a default and copy constructor (as in the second testcase). PR c++/102050 gcc/cp/ChangeLog: * decl.c (grok_special_member_properties): Set TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR and TYPE_HAS_LIST_CTOR independently from each other. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist125.C: New test. * g++.dg/cpp0x/initlist126.C: New test.=