From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0081F385840C; Thu, 24 Mar 2022 18:31:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0081F385840C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96645] [9/10/11/12 Regression] [CWG2335] std::variant default constructor and unparsed DMI Date: Thu, 24 Mar 2022 18:31:46 +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: 9.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: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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: Thu, 24 Mar 2022 18:31:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96645 --- Comment #21 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:346ab5a54a831ad9c78afcbd8dfe98e0e07e3070 commit r12-7804-g346ab5a54a831ad9c78afcbd8dfe98e0e07e3070 Author: Jason Merrill Date: Tue Mar 22 01:10:44 2022 -0400 c++: delayed parse DMI [PR96645] With the changes for PR81359 and PR88368 to make get_nsdmi errors be treated as substitution failure, we have the problem that if we check std::is_default_constructible for a complete class that still has unpar= sed default member initializers, we get an answer (false) that will be wrong once the DMIs have been parsed. The traits avoid this problem for regu= lar incomplete classes by giving an error if the operand is incomplete; we should do the same if get_nsdmi is going to fail due to unparsed DMI. PR c++/96645 gcc/cp/ChangeLog: * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare. * class.cc (type_has_default_ctor_to_be_synthesized): New. (type_has_non_user_provided_default_constructor_1): Support it. (type_has_non_user_provided_default_constructor): Now a wrapper. * method.cc (complain_about_unparsed_dmi): New. (constructible_expr): Call it. gcc/testsuite/ChangeLog: * g++.dg/ext/is_constructible3.C: Expect error. * g++.dg/ext/is_constructible7.C: New test.=