From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 276ED3855598; Fri, 12 May 2023 15:07:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 276ED3855598 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683904077; bh=uqhjLdDGxE0sqZStte/C2UjNfSOrgNE6BWPagLnH35U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CRpd7v+IgiyRZLF1Scv5ERhx5eTxi+6pT+9ufCTABUBL4NtU3ekHNSU1B7kH6laC+ NxhMzI2jF5M5t56sLgGwUo1PXVxvkaSAzxHXmliR+q+rshrYfjwZn7SB7L/K++kYOJ TfPcK18Z2UoHizSf2hzJLmfxwyZXkAR0339v+faE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109761] [10/11/12/13 Regression] Nested class destructor's noexcept specification incorrectly considered as too loose compared to the outer class Date: Fri, 12 May 2023 15:07:56 +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: 11.3.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: 10.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109761 --- Comment #8 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:dc399dfe1265a1222b7cfa0fc35533768a8a1a8a commit r13-7323-gdc399dfe1265a1222b7cfa0fc35533768a8a1a8a Author: Patrick Palka Date: Tue May 9 15:06:34 2023 -0400 c++: noexcept-spec from nested class confusion [PR109761] When late processing a noexcept-spec from a nested class after completi= on of the outer class (since it's a complete-class context), we pass the w= rong class context to noexcept_override_late_checks -- the outer class type instead of the nested class type -- which leads to bogus errors in the below test. This patch fixes this by making noexcept_override_late_checks obtain the class context directly via DECL_CONTEXT instead of via an additional parameter. PR c++/109761 gcc/cp/ChangeLog: * parser.cc (cp_parser_class_specifier): Don't pass a class context to noexcept_override_late_checks. (noexcept_override_late_checks): Remove 'type' parameter and use DECL_CONTEXT of 'fndecl' instead. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/noexcept78.C: New test. (cherry picked from commit c13906f258fb34b3e0c90ddc8d9191dd72f3da0e)=