From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DEBB3858D39; Sat, 1 Jul 2023 15:50:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DEBB3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688226625; bh=2bfHp3c5SRxOF2HEZjUIDa1C/YEPhu2Ra7o5YY/zQos=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hUtr4hrSm9o/SLUvz2DQBV2sqxls5NM87gL/LQyASUBKNx3aT3o/qyD+X7ZWPnwvY NF54GiAKjN6eH2egHdgh09bTLa/nMkJtKyRZGDBkZoks1GUeEth3ZHC7ni5uMlOZpv Z3IchsVTCPIE0sLkMgFNvdONUZIY8r2pIkdTyx3A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/110471] d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' Date: Sat, 01 Jul 2023 15:50:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 9.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot 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=3D110471 --- Comment #2 from CVS Commits --- The releases/gcc-13 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:6e7909191ada316a426739eab88139d63194e05a commit r13-7518-g6e7909191ada316a426739eab88139d63194e05a Author: Iain Buclaw Date: Sat Jul 1 17:01:30 2023 +0200 d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' The version flags for RTMI, RTTI, and exceptions was unconditionally predefined. These are now only predefined if the feature flag is enabled. It was noticed that there was no `-fexceptions' definition inside d/lang.opt, so the detection of the exceptions option flag was only partially working. Once that was fixed, a few places in the front-end implementation were found to fall fowl of `nothrow' rules, these have been fixed upstream and backported here as well. Reviewed-on: https://github.com/dlang/dmd/pull/15357 https://github.com/dlang/dmd/pull/15360 PR d/110471 gcc/d/ChangeLog: * d-builtins.cc (d_init_versions): Predefine D_ModuleInfo, D_Exceptions, and D_TypeInfo only if feature is enabled. * lang.opt: Add -fexceptions. gcc/testsuite/ChangeLog: * gdc.dg/pr110471a.d: New test. * gdc.dg/pr110471b.d: New test. * gdc.dg/pr110471c.d: New test. (cherry picked from commit da108c75ad386b3f1f47abb2265296e4b61d578a)=