From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06BBF385842A; Sat, 25 May 2024 02:16:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06BBF385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716603365; bh=JFbJjsrO38eV9w0pAwSMg//UW9vyLM7RHXTNopLjdMc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eqLVB9lwgO16xSZHPwSUMkcn2KHSG/KCt30yo0h0bS0hLqiihfFCqEloYIROjM+Ec EdUAyxJ0zAwMZCf56ERffWmYawTqxtmvmitE5sYP43OfdtMeGjCJy3io0LcNxw108F 2zh6RuFwFL+THROoX+tPKu/9u5/6KoKly2QyBnrY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115222] gcc ignores noexcept on fields' deconstructors in an union Date: Sat, 25 May 2024 02:16:04 +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: 15.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D115222 --- Comment #3 from Andrew Pinski --- C++14 (and C++11) had slightly different wording here: ``` Given a member function f of some class X, where f is an inheriting constru= ctor (12.9) or an implicitlydeclared special member function, the set of potenti= al exceptions of the implicitly-declared member function f consists of all the members from the following sets: if f is a destructor, the sets of potential exceptions of the destructor invocations for X=E2=80=99s non-variant non-static data members and for X= =E2=80=99s virtual and direct base classes. ``` Looks like GCC just missed the rule applies to unions too.=