]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[modula2] Add return to remove build warning
authorGaius Mulley <gaiusmod2@gmail.com>
Wed, 23 Jul 2025 09:30:35 +0000 (10:30 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Wed, 23 Jul 2025 09:30:35 +0000 (10:30 +0100)
This patch adds a return statement to M2Exception which removes a
build warning.

gcc/m2/ChangeLog:

* gm2-libs/M2EXCEPTION.mod (M2Exception): Add return
exException in case Raise completes.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-libs/M2EXCEPTION.mod

index a17310f5fe3c04d07e69e77478958d49754f881e..e92b16d406abbef67f07de4c305c188a652ac641 100644 (file)
@@ -33,7 +33,7 @@ FROM RTExceptions IMPORT EHBlock, GetExceptionBlock, GetNumber, Raise,
 
 (* If the program or coroutine is in the exception state then return the enumeration
    value representing the exception cause.  If it is not in the exception state then
-   raises and exception (exException).  *)
+   raises an exException exception.  *)
 
 PROCEDURE M2Exception () : M2Exceptions;
 VAR
@@ -45,7 +45,8 @@ BEGIN
    IF n = MAX (CARDINAL)
    THEN
       Raise (ORD (exException), ADR (__FILE__), __LINE__, __COLUMN__, ADR (__FUNCTION__),
-             ADR ('current coroutine is not in the exceptional execution state'))
+             ADR ('current coroutine is not in the exceptional execution state')) ;
+      RETURN exException
    ELSE
       RETURN VAL (M2Exceptions, n)
    END