public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
@ 2023-01-26  7:33 rguenth at gcc dot gnu.org
  2023-01-26  7:35 ` [Bug modula2/108551] " rguenth at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-26  7:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108551
           Summary: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control
                    reaches end of non-void function [-Werror=return-type]
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

We see a build failure with -Werror=return-type (injected from our
RPM_OPT_FLAGS) when building modula2 target libs:

[ 8737s] libtool: compile: 
/home/abuild/rpmbuild/BUILD/gcc-13.0.1+git5374/obj-i586-suse-linux/./gcc/gm2
-B/home/abuild/rpmbuild/BUILD/gcc-13.0.1+git5374/obj-i586-suse-linux/./gcc/ -c
-g -fomit-frame-pointer -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
-Werror=return-type -U_FORTIFY_SOURCE -g -fomit-frame-pointer -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -funwind-tables
-fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type
-U_FORTIFY_SOURCE -I../libm2pim
-I/home/abuild/rpmbuild/BUILD/gcc-13.0.1+git5374/gcc/m2/gm2-libs-pim
-I/home/abuild/rpmbuild/BUILD/gcc-13.0.1+git5374/gcc/m2/gm2-libs
-I/home/abuild/rpmbuild/BUILD/gcc-13.0.1+git5374/gcc/m2/gm2-libs-iso
../../../../libgm2/libm2log/../../gcc/m2/gm2-libs-pim/Termbase.mod  -fPIC -DPIC
-o .libs/Termbase.o
[ 8737s] ../../../../libgm2/libm2log/../../gcc/m2/gm2-libs-pim/Termbase.mod: In
function 'Termbase_KeyPressed':
[ 8737s]
../../../../libgm2/libm2log/../../gcc/m2/gm2-libs-pim/Termbase.mod:128:1:
error: control reaches end of non-void function [-Werror=return-type]
[ 8737s]   128 | END KeyPressed ;
[ 8737s]       | ^~~
[ 8737s] cc1gm2: some warnings being treated as errors
[ 8737s] make[5]: *** [Makefile:782: Termbase.lo] Error 1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
@ 2023-01-26  7:35 ` rguenth at gcc dot gnu.org
  2023-01-26  8:33 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-26  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build, diagnostic

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The function is

PROCEDURE KeyPressed () : BOOLEAN ;
BEGIN
   IF rStack=NIL
   THEN
      Halt(__FILE__, __LINE__, __FUNCTION__, 'no active status procedure')
   ELSE
      RETURN( rStack^.s() )
   END
END KeyPressed ;


I'm not sure how the middle-end diagnostic issued from CFG build is confused
here though, I'm not yet familiar with using cc1gm2 to debug things, nor
produce standalone modula-2 testcases ;)

It also means people might see bogus diagnostics for code like this.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
  2023-01-26  7:35 ` [Bug modula2/108551] " rguenth at gcc dot gnu.org
@ 2023-01-26  8:33 ` rguenth at gcc dot gnu.org
  2023-01-26  9:27 ` marxin at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-26  8:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, I have a reduced

MODULE Test;

PROCEDURE X (VAR Y : BOOLEAN) : BOOLEAN;
BEGIN
  IF Y
  THEN
    RETURN FALSE
  ELSE
    RETURN TRUE
  END
END X ;

END Test.

and

> ./cc1gm2 -quiet test.mod -I m2/gm2-libs -I ~/src/trunk/gcc/m2/gm2-libs -O2 -Werror=return-type
test.mod:1:1: note: In program module 'Test': dynamic linking enabled but no
module ctor list has been created, hint use -fuse-list=filename or
-fgen-module-list=-
    1 | MODULE Test;
      | ^~~~~~
test.mod: In function 'main':
test.mod:1:12: error: control reaches end of non-void function
[-Werror=return-type]
    1 | MODULE Test;
      |            ^
cc1gm2: some warnings being treated as errors

but this is in function "main", so likely not a reduction of the original
issue.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
  2023-01-26  7:35 ` [Bug modula2/108551] " rguenth at gcc dot gnu.org
  2023-01-26  8:33 ` rguenth at gcc dot gnu.org
@ 2023-01-26  9:27 ` marxin at gcc dot gnu.org
  2023-01-26 10:28 ` marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-26  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2023-01-26

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-01-26  9:27 ` marxin at gcc dot gnu.org
@ 2023-01-26 10:28 ` marxin at gcc dot gnu.org
  2023-01-26 12:54 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-26 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
I might reduced that:

$ cat Termbase.mod
IMPLEMENTATION MODULE Termbase ;
TYPE
   ReadMethods = POINTER TO RECORD
                               s   : StatusProcedure ;
                            END ;
   WriteMethod = POINTER TO RECORD
                            END ;
VAR
   rStack: ReadMethods ;
   wStack: WriteMethod ;
PROCEDURE AssignRead (rp: ReadProcedure; sp: StatusProcedure;
                      VAR Done: BOOLEAN) ;
BEGIN
   IF rStack=NIL
   THEN
   END
END AssignRead ;
(*
*)
PROCEDURE UnAssignRead (VAR Done: BOOLEAN) ;
END UnAssignRead ;
PROCEDURE Read (VAR ch: CHAR) ;
END Read ;
PROCEDURE KeyPressed () : BOOLEAN ;
BEGIN
   IF rStack=NIL
   THEN
      RETURN( rStack^.s() )
    ELSE
      RETURN( rStack^.s() )
   END
END KeyPressed ;
PROCEDURE AssignWrite (wp: WriteProcedure; VAR Done: BOOLEAN) ;
BEGIN
   IF wStack=NIL
   THEN   
   END
END AssignWrite ;
PROCEDURE UnAssignWrite (VAR Done: BOOLEAN) ;
END UnAssignWrite ;
PROCEDURE Write (VAR ch: CHAR) ;
END Write ;
END Termbase.

$ /dev/shm/objdir/./gcc/gm2 -B/dev/shm/objdir/./gcc/ Termbase.mod
-Werror=return-type -I/home/marxin/Programming/gcc/gcc/m2/gm2-libs-pim
-I/home/marxin/Programming/gcc/gcc/m2/gm2-libs
Termbase.mod: In function ‘main’:
Termbase.mod:1:32: error: control reaches end of non-void function
[-Werror=return-type]
    1 | IMPLEMENTATION MODULE Termbase ;
      |                                ^
cc1gm2: some warnings being treated as errors

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-01-26 10:28 ` marxin at gcc dot gnu.org
@ 2023-01-26 12:54 ` rguenth at gcc dot gnu.org
  2023-01-26 16:24 ` gaius at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-26 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> I might reduced that:
> 
> $ cat Termbase.mod
> IMPLEMENTATION MODULE Termbase ;
> TYPE
>    ReadMethods = POINTER TO RECORD
>                                s   : StatusProcedure ;
>                             END ;
>    WriteMethod = POINTER TO RECORD
>                             END ;
> VAR
>    rStack: ReadMethods ;
>    wStack: WriteMethod ;
> PROCEDURE AssignRead (rp: ReadProcedure; sp: StatusProcedure;
>                       VAR Done: BOOLEAN) ;
> BEGIN
>    IF rStack=NIL
>    THEN
>    END
> END AssignRead ;
> (*
> *)
> PROCEDURE UnAssignRead (VAR Done: BOOLEAN) ;
> END UnAssignRead ;
> PROCEDURE Read (VAR ch: CHAR) ;
> END Read ;
> PROCEDURE KeyPressed () : BOOLEAN ;
> BEGIN
>    IF rStack=NIL
>    THEN
>       RETURN( rStack^.s() )
>     ELSE
>       RETURN( rStack^.s() )
>    END
> END KeyPressed ;
> PROCEDURE AssignWrite (wp: WriteProcedure; VAR Done: BOOLEAN) ;
> BEGIN
>    IF wStack=NIL
>    THEN   
>    END
> END AssignWrite ;
> PROCEDURE UnAssignWrite (VAR Done: BOOLEAN) ;
> END UnAssignWrite ;
> PROCEDURE Write (VAR ch: CHAR) ;
> END Write ;
> END Termbase.
> 
> $ /dev/shm/objdir/./gcc/gm2 -B/dev/shm/objdir/./gcc/ Termbase.mod
> -Werror=return-type -I/home/marxin/Programming/gcc/gcc/m2/gm2-libs-pim
> -I/home/marxin/Programming/gcc/gcc/m2/gm2-libs
> Termbase.mod: In function ‘main’:

^^^

that's again for 'main', like my attempt at a reduced testcase.  I think
the proper fix is to give up on fixing this diagnostic and instead ignore
-Wreturn-type as intended.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-01-26 12:54 ` rguenth at gcc dot gnu.org
@ 2023-01-26 16:24 ` gaius at gcc dot gnu.org
  2023-01-26 16:41 ` gaius at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-26 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54354
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54354&action=edit
Potential bug fix for missing return 0 in main

Thanks for the bug report.  The -Wreturn-type highlighted a bug in the scaffold
main (missing a RETURN 0 after the exception handling in main)
which I think is fixed in the following patch.  Also contained are two dejagnu
test cases (pass/fail) based on the test case above:

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-01-26 16:24 ` gaius at gcc dot gnu.org
@ 2023-01-26 16:41 ` gaius at gcc dot gnu.org
  2023-01-26 18:45 ` gaius at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-26 16:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #6 from Gaius Mulley <gaius at gcc dot gnu.org> ---
In the initial testcase I think cc1gm2 is ignoring the <* noreturn *> attribute
to M2RTS.mod:Halt.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-01-26 16:41 ` gaius at gcc dot gnu.org
@ 2023-01-26 18:45 ` gaius at gcc dot gnu.org
  2023-01-26 21:44 ` gaius at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-26 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54354|0                           |1
        is obsolete|                            |

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

This patch follows on from the previous patch to implement the handling of <*
noreturn *> attribute in cc1gm2.  I've added Termbase.mod to the testsuite gm2
warnings pass.  It builds and causes no further regressions (without
bootstrap).

Once I've seen it build full bootstrap I'll git push the changes.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-01-26 18:45 ` gaius at gcc dot gnu.org
@ 2023-01-26 21:44 ` gaius at gcc dot gnu.org
  2023-01-27  7:43 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-01-26 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Gaius Mulley <gaius at gcc dot gnu.org> ---
All git committed and pushed.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-01-26 21:44 ` gaius at gcc dot gnu.org
@ 2023-01-27  7:43 ` rguenth at gcc dot gnu.org
  2023-01-27  9:38 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-27  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Thanks, now when PR108555 is fixed the diagnostic should go away again anyway.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-01-27  7:43 ` rguenth at gcc dot gnu.org
@ 2023-01-27  9:38 ` marxin at gcc dot gnu.org
  2023-02-01 17:26 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-01-27  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Gaius Mulley from comment #8)
> All git committed and pushed.

Please use PR markers in commit messages so that PR comment entries are
automatically added.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2023-01-27  9:38 ` marxin at gcc dot gnu.org
@ 2023-02-01 17:26 ` cvs-commit at gcc dot gnu.org
  2023-02-03  9:01 ` gaius at gcc dot gnu.org
  2023-02-03  9:17 ` marxin at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-01 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:9fadd8dec79876d3c393daccc62959f6f4853cc5

commit r13-5634-g9fadd8dec79876d3c393daccc62959f6f4853cc5
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Wed Feb 1 17:26:00 2023 +0000

    Fixup noreturn attributes in modula-2 [PR108551] and [PR108612]

    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]
    This patch adds missing return values to the procedure functions
    mentioned in PR108612 and PR108551.  It corrects the noreturn
    attribute to throw and rethrow in the modula2 frontend.  The patch
    also changes HALT, Halt, Raise procedures in the libraries to use
    the <* noreturn *> attribute.  Finally the patch includes
    rebuilt bootstrap tools mc and pge.

    gcc/m2/ChangeLog:

            * Make-lang.in (GM2_FLAGS): Add -fno-return -Wreturn-type.
            (GM2_ISO_FLAGS): Add -fno-return -Wreturn-type.
            * Make-maintainer.in (GM2PATH): Split into separate -I components.
            (MC-LIB-DEFS): Add RTentity.def.
            (m2/boot-bin/mc-devel$(exeext)): Changed -I$(GM2PATH) to
            $(GM2PATH).
            (m2/boot-bin/mc-opt$(exeext)): Separate -I paths.
            (m2/mc/decl.o): Separate -I paths.
            (gm2-bootstrap): Separate -I paths.
            (m2/mc-boot-gen/$(SRC_PREFIX)%.h): Separate -I paths.
            (m2/mc-boot-gen/$(SRC_PREFIX)decl.c): Separate -I paths.
            (m2/mc-boot-gen/$(SRC_PREFIX)%.c): Separate -I paths.
            (gm2.verifyparanoid): Separate -I paths.
            (gm2.verifystage12): Separate -I paths.
            * gm2-compiler/M2ALU.mod (GetConstructorElement): Add default
            Return NulSym.  Remove return from the error case.
            * gm2-compiler/M2Base.mod (ComplexToScalar): Return RType
            from the error case.
            (MixMetaTypes):  Return MakeError as a default.
            * gm2-compiler/M2GCCDeclare.mod (GetTypeMin): Return NulSym
            from the error case.
            (GetTypeMax): Return NulSym from the error case.
            * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Replace Assert
            by InternalError.
            * gm2-compiler/M2Quads.mod (GetItemPointedTo): Add InternalError.
            (GetTypeMin): Add InternalError.
            (GetTypeMax): Add InternalError.
            * gm2-compiler/M2System.mod (InitSystem): Call
            PutProcedureNoReturn on Throw.
            * gm2-gcc/m2except.cc (m2except_InitExceptions): fn_throw_tree
            declare as noreturn.  fn_rethrow_tree declare as noreturn.
            * gm2-libs-coroutines/Debug.def (Halt): Add noreturn attribute.
            * gm2-libs-coroutines/SYSTEM.def (THROW): Add noreturn attribute.
            * gm2-libs-iso/ClientSocket.mod (dorbytes): Add return FALSE.
            * gm2-libs-iso/EXCEPTIONS.def (RAISE): Add noreturn attribute.
            * gm2-libs-iso/IOLink.def (RAISEdevException): Add noreturn
attribute.
            * gm2-libs-iso/M2RTS.def (HALT): Add noreturn attribute.
            (Halt): Ditto.
            (HaltC): Ditto.
            (ErrorMessage): Ditto.
            (AssignmentException): Ditto.
            (ReturnException): Ditto.
            (IncException): Ditto.
            (DecException): Ditto.
            (InclException): Ditto.
            (ExclException): Ditto.
            (ShiftException): Ditto.
            (RotateException): Ditto.
            (StaticArraySubscriptException): Ditto.
            (DynamicArraySubscriptException): Ditto.
            (ForLoopBeginException): Ditto.
            (ForLoopToException): Ditto.
            (ForLoopEndException): Ditto.
            (PointerNilException): Ditto.
            (NoReturnException): Ditto.
            (CaseException): Ditto.
            (WholeNonPosDivException): Ditto.
            (WholeNonPosModException): Ditto.
            (WholeZeroDivException): Ditto.
            (WholeZeroRemException): Ditto.
            (WholeValueException): Ditto.
            (RealValueException): Ditto.
            (ParameterException): Ditto.
            (NoException): Ditto.
            * gm2-libs-iso/SYSTEM.def (THROW): Ditto.
            * gm2-libs-iso/TermFile.mod (dorbytes): Add default return FALSE.
            * gm2-libs-min/M2RTS.def: Add noreturn attribute.
            * gm2-libs/FIO.mod (BufferedRead): Return -1.
            (getFileName): Return NIL.
            (getFileNameLength): Return 0.
            * gm2-libs/M2RTS.def (HaltC): Add noreturn attribute.
            (AssignmentException): Ditto.
            (ReturnException): Ditto.
            (IncException): Ditto.
            (DecException): Ditto.
            (InclException): Ditto.
            (ExclException): Ditto.
            (ShiftException): Ditto.
            (RotateException): Ditto.
            (StaticArraySubscriptException): Ditto.
            (DynamicArraySubscriptException): Ditto.
            (ForLoopBeginException): Ditto.
            (ForLoopToException): Ditto.
            (ForLoopEndException): Ditto.
            (PointerNilException): Ditto.
            (NoReturnException): Ditto.
            (CaseException): Ditto.
            (WholeNonPosDivException): Ditto.
            (WholeNonPosModException): Ditto.
            (WholeZeroDivException): Ditto.
            (WholeZeroRemException): Ditto.
            (WholeValueException): Ditto.
            (RealValueException): Ditto.
            (ParameterException): Ditto.
            (NoException): Ditto.
            * gm2-libs/RTExceptions.def (Raise): Ditto.
            * gm2-libs/RTExceptions.mod (InvokeHandler): Ditto.
            * gm2-libs/SYSTEM.def (THROW): Ditto.
            * m2.flex (_M2_m2flex_fini): Remamed to...
            (_M2_m2flex_finish): ...here.
            * mc-boot-ch/GBuiltins.c (_M2_Builtins_finish): Remamed to...
            (_M2_Builtins_fini): ...this.
            * mc-boot-ch/GRTco.c (_M2_RTco_finish): Remamed to...
            (_M2_RTco_fini): ...this.
            * mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_finish): Remamed to...
            (_M2_SYSTEM_fini): ...this.
            * mc-boot-ch/GSelective.c (_M2_Selective_finish): Remamed to...
            (_M2_Selective_fini): ...this.
            * mc-boot-ch/GSysExceptions.c (_M2_SysExceptions_init): Add
            parameters.
            (_M2_SysExceptions_finish): Remamed to...
            (_M2_SysExceptions_fini): ...this.
            * mc-boot-ch/GUnixArgs.cc (_M2_UnixArgs_finish): Remamed to...
            (_M2_UnixArgs_fini): ...this.
            (_M2_UnixArgs_ctor::_M2_UnixArgs_ctor): Change parameter
            to _M2_UnixArgs_fini.
            * mc-boot-ch/Gdtoa.c (_M2_dtoa_finish): Remamed to...
            (_M2_dtoa_fini): ...this.
            * mc-boot-ch/Gerrno.c (_M2_errno_finish): Remamed to...
            (_M2_errno_fini): ...this.
            * mc-boot-ch/Gldtoa.c (_M2_ldtoa_finish): Remamed to...
            (_M2_ldtoa_fini): ...this.
            * mc-boot-ch/Gtermios.cc (_M2_termios_init): Add parameters.
            (_M2_termios_finish): Remamed to...
            (_M2_termios_fini): ...this.
            * mc-boot-ch/Gwrapc.c (_M2_wrapc_init): Add parameters.
            (_M2_wrapc_finish): Remamed to...
            (_M2_wrapc_fini): ...this.
            * mc-boot/GASCII.c: Rebuild.
            * mc-boot/GArgs.c: Rebuild.
            * mc-boot/GAssertion.c: Rebuild.
            * mc-boot/GBreak.c: Rebuild.
            * mc-boot/GCmdArgs.c: Rebuild.
            * mc-boot/GDebug.c: Rebuild.
            * mc-boot/GDynamicStrings.c: Rebuild.
            * mc-boot/GEnvironment.c: Rebuild.
            * mc-boot/GFIO.c: Rebuild.
            * mc-boot/GFormatStrings.c: Rebuild.
            * mc-boot/GFpuIO.c: Rebuild.
            * mc-boot/GIO.c: Rebuild.
            * mc-boot/GIndexing.c: Rebuild.
            * mc-boot/GM2Dependent.c: Rebuild.
            * mc-boot/GM2EXCEPTION.c: Rebuild.
            * mc-boot/GM2RTS.c: Rebuild.
            * mc-boot/GM2RTS.h: Rebuild.
            * mc-boot/GMemUtils.c: Rebuild.
            * mc-boot/GNumberIO.c: Rebuild.
            * mc-boot/GPushBackInput.c: Rebuild.
            * mc-boot/GRTExceptions.c: Rebuild.
            * mc-boot/GRTExceptions.h: Rebuild.
            * mc-boot/GRTco.h: Rebuild.
            * mc-boot/GRTint.c: Rebuild.
            * mc-boot/GSArgs.c: Rebuild.
            * mc-boot/GSFIO.c: Rebuild.
            * mc-boot/GStdIO.c: Rebuild.
            * mc-boot/GStorage.c: Rebuild.
            * mc-boot/GStrCase.c: Rebuild.
            * mc-boot/GStrIO.c: Rebuild.
            * mc-boot/GStrLib.c: Rebuild.
            * mc-boot/GStringConvert.c: Rebuild.
            * mc-boot/GSysStorage.c: Rebuild.
            * mc-boot/GTimeString.c: Rebuild.
            * mc-boot/Galists.c: Rebuild.
            * mc-boot/Gdecl.c: Rebuild.
            * mc-boot/Gkeyc.c: Rebuild.
            * mc-boot/Glists.c: Rebuild.
            * mc-boot/GmcComment.c: Rebuild.
            * mc-boot/GmcComp.c: Rebuild.
            * mc-boot/GmcDebug.c: Rebuild.
            * mc-boot/GmcError.c: Rebuild.
            * mc-boot/GmcFileName.c: Rebuild.
            * mc-boot/GmcLexBuf.c: Rebuild.
            * mc-boot/GmcMetaError.c: Rebuild.
            * mc-boot/GmcOptions.c: Rebuild.
            * mc-boot/GmcPreprocess.c: Rebuild.
            * mc-boot/GmcPretty.c: Rebuild.
            * mc-boot/GmcPrintf.c: Rebuild.
            * mc-boot/GmcQuiet.c: Rebuild.
            * mc-boot/GmcReserved.c: Rebuild.
            * mc-boot/GmcSearch.c: Rebuild.
            * mc-boot/GmcStack.c: Rebuild.
            * mc-boot/GmcStream.c: Rebuild.
            * mc-boot/Gmcp1.c: Rebuild.
            * mc-boot/Gmcp2.c: Rebuild.
            * mc-boot/Gmcp3.c: Rebuild.
            * mc-boot/Gmcp4.c: Rebuild.
            * mc-boot/Gmcp5.c: Rebuild.
            * mc-boot/GnameKey.c: Rebuild.
            * mc-boot/GsymbolKey.c: Rebuild.
            * mc-boot/Gtop.c: Rebuild.
            * mc-boot/Gvarargs.c: Rebuild.
            * mc-boot/Gwlists.c: Rebuild.
            * mc-boot/GRTentity.h: New file.
            * mc/decl.mod (scaffoldStatic): Change _finish to _fini.
            * mc/mc.flex (_M2_mcflex_fini): New function.
            (_M2_mcflex_finish): Remove function.
            * tools-src/mklink.c (GenerateFinishCalls): Change
            _finish to _fini.
            (GeneratePrototypes): Change _finish to _fini.

    libgm2/ChangeLog:

            * libm2cor/Makefile.am (libm2cor_la_M2FLAGS): Add -Wreturn-type
            -fcase.
            * libm2cor/Makefile.in: Rebuild.
            * libm2iso/Makefile.am (libm2iso_la_M2FLAGS): Add -Wreturn-type
            -fcase.
            * libm2iso/Makefile.in: Rebuild.
            * libm2log/Makefile.am (libm2log_la_M2FLAGS): Add -Wreturn-type
            -fcase.
            * libm2log/Makefile.in: Rebuild.
            * libm2pim/Makefile.am (libm2pim_la_M2FLAGS): Add -Wreturn-type
            -fcase.
            * libm2pim/Makefile.in: Rebuild.

            PR modula2/108612
            PR modula2/108551

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2023-02-01 17:26 ` cvs-commit at gcc dot gnu.org
@ 2023-02-03  9:01 ` gaius at gcc dot gnu.org
  2023-02-03  9:17 ` marxin at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-02-03  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #12 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing after the git push and also PR108555 has been fixed.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug modula2/108551] gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type]
  2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2023-02-03  9:01 ` gaius at gcc dot gnu.org
@ 2023-02-03  9:17 ` marxin at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-02-03  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks, I can confirm it's fine now.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-02-03  9:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26  7:33 [Bug modula2/108551] New: gcc/m2/gm2-libs-pim/Termbase.mod:128:1: error: control reaches end of non-void function [-Werror=return-type] rguenth at gcc dot gnu.org
2023-01-26  7:35 ` [Bug modula2/108551] " rguenth at gcc dot gnu.org
2023-01-26  8:33 ` rguenth at gcc dot gnu.org
2023-01-26  9:27 ` marxin at gcc dot gnu.org
2023-01-26 10:28 ` marxin at gcc dot gnu.org
2023-01-26 12:54 ` rguenth at gcc dot gnu.org
2023-01-26 16:24 ` gaius at gcc dot gnu.org
2023-01-26 16:41 ` gaius at gcc dot gnu.org
2023-01-26 18:45 ` gaius at gcc dot gnu.org
2023-01-26 21:44 ` gaius at gcc dot gnu.org
2023-01-27  7:43 ` rguenth at gcc dot gnu.org
2023-01-27  9:38 ` marxin at gcc dot gnu.org
2023-02-01 17:26 ` cvs-commit at gcc dot gnu.org
2023-02-03  9:01 ` gaius at gcc dot gnu.org
2023-02-03  9:17 ` marxin at gcc dot gnu.org

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).