From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E88A63858414; Fri, 19 May 2023 15:10:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E88A63858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684509022; bh=mS2YUV23L48UeOkIr6wcQRW3j9AEbs+6YlMBEQGNpQI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FB0WLyKXbBMSAGn85Cz3CMGYXaEX/wSALr/TgYxmICj9sg/6qC/1YmcWv2aRFOmx1 rah1LT1SeCoZUuNVrmzt0qA1YqF8pOYFkDus0EJXmw+Lsy2C+R0cHgCc2kC+fyQvAM cn5qT9IjFMJttr3HJ1/YI6hbEzB6ulMyFuPBV6MM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109871] error: call of overloaded ... is ambiguous (std::vector vs designated initializers) Date: Fri, 19 May 2023 15:10:22 +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: 13.0 X-Bugzilla-Keywords: accepts-invalid, 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: 13.2 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109871 --- Comment #4 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:efdcb731bbd6e20552fe878d54e59dc06af02334 commit r13-7357-gefdcb731bbd6e20552fe878d54e59dc06af02334 Author: Patrick Palka Date: Tue May 16 12:39:16 2023 -0400 c++: desig init in presence of list ctor [PR109871] add_list_candidates has logic to reject designated initialization of a non-aggregate type, but this is inadvertently being suppressed if the t= ype has a list constructor due to the order of case analysis, which in the below testcase leads to us incorrectly treating the initializer list as= if it's non-designated. This patch fixes this by making us check for inva= lid designated initialization sooner. PR c++/109871 gcc/cp/ChangeLog: * call.cc (add_list_candidates): Check for invalid designated initialization sooner and even for types that have a list constructor. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/desig27.C: New test. (cherry picked from commit d5e5007c4b534391c0a97be56f6024fde1a88682)=