]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR modula2/117555: libgm2 build failure after r15-5081-g95960cd473297c
authorGaius Mulley <gaiusmod2@gmail.com>
Mon, 18 Nov 2024 18:35:28 +0000 (18:35 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Mon, 18 Nov 2024 18:35:28 +0000 (18:35 +0000)
This patch adds missing return statements to library procedure
functions.  These missing statements occur after a call to RAISE.

gcc/m2/ChangeLog:

PR modula2/117555
* gm2-libs-iso/M2EXCEPTION.mod (M2Exception): Add missing
return statement.
* gm2-libs-iso/RealConv.mod (ValueReal): Ditto.
* gm2-libs-iso/RndFile.mod (StartPos): Ditto.
(EndPos): Ditto.
(NewPos): Ditto.
* gm2-libs-iso/ShortConv.mod (ValueReal): Ditto.
* gm2-libs-iso/WholeConv.mod (ValueInt): Ditto.
(ValueCard): Ditto.

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

index 637e086c2998bc187c58059bd6ef14cfd2d141cb..2ff7c7296647c9d558230a2d30de3e0f6da08554 100644 (file)
@@ -42,7 +42,8 @@ BEGIN
    ELSE
       RTExceptions.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
    END
 END M2Exception ;
 
index 4223f3029ae8856140a3abb460f0b448abeeee27..6f9fe6fcc7b231135663d49f1fe83b1bc54cd661 100644 (file)
@@ -256,7 +256,8 @@ BEGIN
       RETURN( doValueReal(str) )
    ELSE
       EXCEPTIONS.RAISE(realConv, ORD(invalid),
-                       'RealConv.' + __FUNCTION__ + ': real number is invalid')
+                       'RealConv.' + __FUNCTION__ + ': real number is invalid') ;
+      RETURN 0.0
    END
 END ValueReal ;
 
index 46a2efdaac4aebf17075332877ce4122fceaeb89..42451888bafea84fc74ef9cb3d29094ebd0915ee 100644 (file)
@@ -359,13 +359,13 @@ VAR
 BEGIN
    IF IsRndFile(cid)
    THEN
-      d := DeviceTablePtrValue(cid, did) ;
-      RETURN( 0 )
+      d := DeviceTablePtrValue(cid, did)
    ELSE
       RAISEdevException(cid, did, IOChan.wrongDevice,
                         'RndFile.' + __FUNCTION__ +
                         ': channel is not a random file')
-   END
+   END ;
+   RETURN( 0 )
 END StartPos ;
 
 
@@ -386,7 +386,8 @@ BEGIN
    ELSE
       RAISEdevException(cid, did, IOChan.wrongDevice,
                         'RndFile.' + __FUNCTION__ +
-                        ': channel is not a random file')
+                        ': channel is not a random file') ;
+      RETURN 0
    END
 END CurrentPos ;
 
@@ -416,7 +417,8 @@ BEGIN
    ELSE
       RAISEdevException(cid, did, IOChan.wrongDevice,
                         'RndFile.' + __FUNCTION__ +
-                        ': channel is not a random file')
+                        ': channel is not a random file') ;
+      RETURN 0
    END
 END EndPos ;
 
@@ -442,7 +444,8 @@ BEGIN
    ELSE
       RAISEdevException(cid, did, IOChan.wrongDevice,
                         'RndFile.' + __FUNCTION__ +
-                        ': channel is not a random file')
+                        ': channel is not a random file') ;
+      RETURN 0
    END
 END NewPos ;
 
index cfceb25c8f4c8c3f1cbf89a9e56c74b149da807b..bb835c6102ec9a4b4600d62aa020825506742a72 100644 (file)
@@ -257,7 +257,8 @@ BEGIN
       RETURN( doValueReal(str) )
    ELSE
       EXCEPTIONS.RAISE(realConv, ORD(invalid),
-                       'ShortConv.' + __FUNCTION__ + ': real number is invalid')
+                       'ShortConv.' + __FUNCTION__ + ': real number is invalid') ;
+      RETURN 0.0
    END
 END ValueReal ;
 
index 34ca7aca1a115ed159071b5731b005dea9c23156..769a568fe32ff8ffd021a75e8d94d57b9f87c0cb 100644 (file)
@@ -196,7 +196,8 @@ BEGIN
       RETURN( v )
    ELSE
       EXCEPTIONS.RAISE(wholeConv, ORD(invalidSigned),
-                       'WholeConv.' + __FUNCTION__ + ': signed number is invalid')
+                       'WholeConv.' + __FUNCTION__ + ': signed number is invalid') ;
+      RETURN 0
    END
 END ValueInt ;
 
@@ -333,7 +334,8 @@ BEGIN
       RETURN( value )
    ELSE
       EXCEPTIONS.RAISE(wholeConv, ORD(invalidUnsigned),
-                       'WholeConv:' + __FUNCTION__ + ': unsigned number is invalid')
+                       'WholeConv:' + __FUNCTION__ + ': unsigned number is invalid') ;
+      RETURN 0
    END
 END ValueCard ;