From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F37E3858CDB; Tue, 28 Feb 2023 06:06:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F37E3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677564377; bh=E/Ro6bxgyht58iSXvfFru8FAjiFOZnteeK1of2RX9mE=; h=From:To:Subject:Date:From; b=sGrgsAG21/YWK1Hzk/tnvFLHM3eKFoHLK8nAp7B0l8SNfKNILCueiK+u1Omn1pUQa eIzUxpD/U3wpW0U3Fz+gh+lE+yNZIjEYNvEQWYY078VcfwFC5E6V3Ukv5m3vi/TOY5 uRoMnw2F4v8TEOK/9feMSYGo+FDiZ9BxDXGx55Rw= From: "ibuclaw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/108962] New: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' Date: Tue, 28 Feb 2023 06:06:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ibuclaw 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108962 Bug ID: 108962 Summary: d: Don't generate code that throws exceptions when compiling with `-fno-exceptions' Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: ibuclaw at gcc dot gnu.org Target Milestone: --- There are a few constructs that implicitly raise an Error exception, for example, `final switch`. ``` void main() { final switch (0) { case 1: return; } } ``` It might be more desirable to instead abort the runtime, optionally creatin= g a trace before exiting.=