public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gaius at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-108612-4-BxHQvKWj1J@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108612-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108612

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gaius at gcc dot gnu.org

--- Comment #3 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54380
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54380&action=edit
Proposed fix

PR108612 - m2/gm2-libs-iso/ClientSocket.mod:229:1: error: control
reaches end of non-void function [-Werror=return-type]
PR108551 - gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control
reaches end of non-void function [-Werror=return-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).

  parent reply	other threads:[~2023-02-01  0:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  9:17 [Bug modula2/108612] New: " marxin at gcc dot gnu.org
2023-01-31  9:19 ` [Bug modula2/108612] " marxin at gcc dot gnu.org
2023-01-31 13:14 ` gaius at gcc dot gnu.org
2023-02-01  0:57 ` gaius at gcc dot gnu.org [this message]
2023-02-01 12:33 ` gaius at gcc dot gnu.org
2023-02-01 15:03 ` marxin at gcc dot gnu.org
2023-02-01 15:53 ` gaius at gcc dot gnu.org
2023-02-01 17:26 ` cvs-commit at gcc dot gnu.org
2023-02-03  9:02 ` gaius at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108612-4-BxHQvKWj1J@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).