From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 507283858D33; Fri, 31 Mar 2023 22:19:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 507283858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680301188; bh=Z2sEtAKqwli4lh2XR/Nx0QulNCoEhkZajDLP1s+3ZCE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HuMHLdLI8djLCg02zghMxfffsEIHpmfO8SF5fjzyuQljJYGpulgxYDpxGMjQKZ+bK igQjUif6Cu47+in8uFfDAV2Kt0J/2C3mBvIof/h8vTidhn0kGf+pW3kuk+OsKMnt4a G+Evipyn88a0sYHxFaN2djVeZrr5F561XMToxWSQ= 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 22:19:48 +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 #4 from Andrew Pinski --- (In reply to contact from comment #3) > I'm not sure if you read the thread I linked: If the statements there are > correct, atm a instruction that causes a crash under any circumstances is > generated and returned if the statement is missing. Yes the code is undefined so anything can happen.=