]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] PR modula2/117555: Add missing return statement after raise
authorGaius Mulley <gaiusmod2@gmail.com>
Mon, 2 Dec 2024 14:34:32 +0000 (14:34 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Mon, 2 Dec 2024 14:34:32 +0000 (14:34 +0000)
commit89761f1f03565468eb3b15259f6ad42af0cfe198
treed4e64096030f93964f02ce9ab127e29b35f8ddd8
parentb11f53a91238a0ac5499862a3e7e127f02bff81e
[PATCH] 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.

(cherry picked from commit e77fd9aa89c210db6006fcefb03d80bae0fae851)

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