]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR modula2/111085 nexttoward and nexttowardf contain incorrect definitions
authorGaius Mulley <gaiusmod2@gmail.com>
Sun, 20 Aug 2023 22:27:34 +0000 (23:27 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Sun, 20 Aug 2023 22:27:34 +0000 (23:27 +0100)
The definition for procedures nexttoward and nexttowardf contain
second incorrect parameter and return types.  This bug was
discovered when attempting to resolve PR 108143 and is applied
separately and prior to PR 108143.

gcc/m2/ChangeLog:

PR modula2/111085
* gm2-libs/Builtins.def (nexttoward): Alter the second
parameter to LONGREAL.
(nexttowardf): Alter the second parameter to LONGREAL.
* gm2-libs/Builtins.mod (nexttoward): Alter the second
parameter to LONGREAL.
(nexttowardf): Alter the second parameter to LONGREAL.
* gm2-libs/cbuiltin.def (nexttoward): Alter the second
parameter to LONGREAL.
(nexttowardf): Alter the second parameter to LONGREAL.

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

index eda36c3cfce7a9a9e05e9be8f98eb299e86c9603..651ade580cb09b3c5efc087fa995ebace02b7023 100644 (file)
@@ -91,8 +91,8 @@ PROCEDURE __BUILTIN__ nextafter (x, y: REAL) : REAL ;
 PROCEDURE __BUILTIN__ nextafterf (x, y: SHORTREAL) : SHORTREAL ;
 PROCEDURE __BUILTIN__ nextafterl (x, y: LONGREAL) : LONGREAL ;
 
-PROCEDURE __BUILTIN__ nexttoward (x, y: REAL) : LONGREAL ;
-PROCEDURE __BUILTIN__ nexttowardf (x, y: SHORTREAL) : LONGREAL ;
+PROCEDURE __BUILTIN__ nexttoward (x: REAL; y: LONGREAL) : REAL ;
+PROCEDURE __BUILTIN__ nexttowardf (x: SHORTREAL; y: LONGREAL) : SHORTREAL ;
 PROCEDURE __BUILTIN__ nexttowardl (x, y: LONGREAL) : LONGREAL ;
 
 PROCEDURE __BUILTIN__ scalbln (x: REAL; n: LONGINT) : REAL ;
index 963e88ec461f8d07cd57bea86248e9603b4d503b..70c1f8a3e1fa274b281cfb766d4b0fd71b71410e 100644 (file)
@@ -267,12 +267,12 @@ BEGIN
    RETURN cbuiltin.nextafterl (x, y)
 END nextafterl ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_nexttoward)) nexttoward (x, y: REAL) : LONGREAL ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_nexttoward)) nexttoward (x: REAL; y: LONGREAL) : REAL ;
 BEGIN
    RETURN cbuiltin.nexttoward (x, y)
 END nexttoward ;
 
-PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_nexttowardf)) nexttowardf (x, y: SHORTREAL) : LONGREAL ;
+PROCEDURE __ATTRIBUTE__  __BUILTIN__ ((__builtin_nexttowardf)) nexttowardf (x: SHORTREAL; y: LONGREAL) : SHORTREAL ;
 BEGIN
    RETURN cbuiltin.nexttowardf (x, y)
 END nexttowardf ;
index 99927058bc6c18ea62dcb3447ed86c04fdd83c79..64d0a79fb5091954fd83702f1802168d95a81fcd 100644 (file)
@@ -118,8 +118,8 @@ PROCEDURE nextafter (x, y: REAL) : REAL ;
 PROCEDURE nextafterf (x, y: SHORTREAL) : SHORTREAL ;
 PROCEDURE nextafterl (x, y: LONGREAL) : LONGREAL ;
 
-PROCEDURE nexttoward (x, y: REAL) : REAL ;
-PROCEDURE nexttowardf (x, y: SHORTREAL) : SHORTREAL ;
+PROCEDURE nexttoward (x: REAL; y: LONGREAL) : REAL ;
+PROCEDURE nexttowardf (x: SHORTREAL; y: LONGREAL) : SHORTREAL ;
 PROCEDURE nexttowardl (x, y: LONGREAL) : LONGREAL ;
 
 PROCEDURE scalb (x, n: REAL) : REAL ;