]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/117555: Add missing return statement after raise
authorGaius Mulley <gaiusmod2@gmail.com>
Sat, 16 Nov 2024 02:32:56 +0000 (02:32 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Sat, 16 Nov 2024 02:32:56 +0000 (02:32 +0000)
commite77fd9aa89c210db6006fcefb03d80bae0fae851
treee2f1a80966542af92ee40c46e503ed46e39c1a2b
parent63798670e12fb9b2575f67e90d0a0c82b60becba
PR modula2/117555: Add missing return statement after raise

This patch adds missing return statements after a call to RAISE.  Four
of the modules in libgm2 have procedure functions with missing return
statements.  These errors were exposed after the reimplementation of
parameter declaration patch and triggered by -Wreturn-type.  The patch
also adds exit statements to the M2RTS noreturn functions.

gcc/m2/ChangeLog:

PR modula2/117555
* gm2-libs-iso/EXCEPTIONS.mod (CurrentNumber): Add return
statement.
* gm2-libs-iso/IOChan.mod (ReadResult): Ditto.
(CurrentFlags): Ditto.
(DeviceError): Ditto.
* gm2-libs-iso/IOLink.mod (DeviceTablePtrValue): Ditto.
* gm2-libs-iso/LongConv.mod (ValueReal): Ditto.
* gm2-libs/M2RTS.mod (Halt): Add noreturn attribute.
Add exit (1).
(HaltC): Add exit (1).
* pge-boot/GM2RTS.cc (M2RTS_Halt): Add exit (1).
(M2RTS_HaltC): Ditto.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-libs-iso/EXCEPTIONS.mod
gcc/m2/gm2-libs-iso/IOChan.mod
gcc/m2/gm2-libs-iso/IOLink.mod
gcc/m2/gm2-libs-iso/LongConv.mod
gcc/m2/gm2-libs/M2RTS.mod
gcc/m2/pge-boot/GM2RTS.cc