From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C94763858D33; Fri, 31 Mar 2023 18:40:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C94763858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680288009; bh=JLQV+DF3f0FLxSOQuYkN30lmhHTlfyeyMz3FPjvdqoU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cSZQqUG4BUD8mhy4S62GHvhp6Bdg44j70WCb1gLmZ4Wd0QrHRBiH9rvaNsVeCCXPb EGik8OMzei4cH+O/jsSykLBqI4DEkDC6Cn4T+1T8I0dkDZWju94hJovdevjpcicoxI nUAjnp0bHyGoUTzcLPXkG9dLWR9Z6Bg++nazRpuU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109364] Missing return statement in a non void function gives only a warning but produces a forced crash. Date: Fri, 31 Mar 2023 18:40:09 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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=3D109364 --- Comment #2 from Andrew Pinski --- For GCC 13+, you can use -funreachable-traps which is enabled at -Og at lea= st.=