From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 391833857349; Sat, 6 May 2023 23:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 391833857349 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683417282; bh=jdRc9qNsp4Q+A8A/TJ83NLIDNR048ngyZ7GR657DWT4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PZVp/FP+mgeO6H5noI+mTNs9sRXh/4f7CiwOISNAkvTqb19s+50xPpoqr8LoayUR8 F8bFjGIdeGfHHa3/45nv343uAKZwLgYz8z3gQ28aKwcWibQO68PxZbi7eaoiJXRK6S B6CNJfb853XS0j7xoBtaWfLfB4RCg4hGdY4vpb10= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109761] Nested class destructor's noexcept specification incorrectly considered as too loose compared to the outer class Date: Sat, 06 May 2023 23:54:42 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 #3 from Andrew Pinski --- GCC 9 produced: :20:55: error: 'class outer' has no member named 'on_nested_ctor' 20 | explicit nested(outer& o) noexcept(noexcept(o.on_nested_ctor())) : | ^~~~~~~~~~~~~~ :29:45: error: 'class outer' has no member named 'on_nested_dtor' 29 | ~nested() noexcept(noexcept(m_outer.on_nested_dtor())) | ^~~~~~~~~~~~~~ GCC 8 produced: :20:53: error: invalid use of incomplete type 'class outer' explicit nested(outer& o) noexcept(noexcept(o.on_nested_ctor())) : ^ :9:7: note: forward declaration of 'class outer' class outer : ^~~~~ :29:37: error: invalid use of incomplete type 'class outer' ~nested() noexcept(noexcept(m_outer.on_nested_dtor())) ^~~~~~~ :9:7: note: forward declaration of 'class outer' class outer : ^~~~~=