From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18D9F3858D38; Wed, 1 Feb 2023 00:57:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18D9F3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675213036; bh=ieXVYzOfgUy/+I7UgTnFan0nWK0i7GS7T4LidWLWTtg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CywtYccue/OH3BsbmmycdcPurvPu03l3DFGvW+0f+AdzFYNYf9nt4G/OqIIbpr61r MA4L86FtKDNLNWR1jTnGjH8Xm8EVTE49rS5UnuVSLsv6RrpFVjhnQS/uKWvB49B6hy keJ/OMP5Zqg56imItP31j62urgp5JiiCvOFpay5I= From: "gaius at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108612] m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control reaches end of non-void function [-Werror=return-type] Date: Wed, 01 Feb 2023 00:57:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gaius at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created 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=3D108612 Gaius Mulley changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gaius at gcc dot gnu.org --- Comment #3 from Gaius Mulley --- Created attachment 54380 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54380&action=3Dedit Proposed fix PR108612 - m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control reaches end of non-void function [-Werror=3Dreturn-type] PR108551 - gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=3Dreturn-type] The immediate fixes would be to ensure that the offending procedure functions return a value. However the front end does not correctly declared the throw function to be noreturn. Also HALT, Halt, Raise procedures in the libraries need the <* noreturn *> attribute to be applied. Finally when these changes have been made the bootstrap tools mc and pge need rebuilding. The patch also changes the build flags for m2 libraries to -Wreturn-type -fcase. (It it worth checking whether -fcase needs a 2nd implementation should -fno-exceptions be used - and call Halt).=