delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/03/16/08:38:12

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200203161337.g2GDbgK26711@speedy.ludd.luth.se>
Subject: libm and gcc 3.0X warnings
To: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Date: Sat, 16 Mar 2002 14:37:42 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

As Eli suggested I've run the cygwin test suite with this patch
applied:

Index: djgpp/src/libm/math/ef_j0.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libm/math/ef_j0.c,v
retrieving revision 1.1
diff -p -u -r1.1 ef_j0.c
--- djgpp/src/libm/math/ef_j0.c 1998/02/07 14:13:26     1.1
+++ djgpp/src/libm/math/ef_j0.c 2002/03/16 13:33:47
@@ -13,6 +13,7 @@
  * ====================================================
  */
 
+#include <stdlib.h>
 #include "fdlibm.h"
 
 #ifdef __STDC__
@@ -74,7 +75,7 @@ static float zero = 0.0;
         * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
         * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
         */
-               if(ix>0x80000000U) z = (invsqrtpi*cc)/__ieee754_sqrtf(x);
+               if((__uint32_t)ix>0x80000000U) abort() /* Was: z = (invsqrtpi*cc
)/__ieee754_sqrtf(x) */ ;
                else {
                    u = pzerof(x); v = qzerof(x);
                    z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(x);
@@ -156,7 +157,7 @@ v04  =  4.4111031494e-10; /* 0x2ff280c2 
                     if ((s*c)<zero) cc = z/ss;
                     else            ss = z/cc;
                 }
-                if(ix>0x80000000U) z = (invsqrtpi*ss)/__ieee754_sqrtf(x);
+                if((__uint32_t)ix>0x80000000U) abort() /* Was: z = (invsqrtpi*s
s)/__ieee754_sqrtf(x) */ ;
                 else {
                     u = pzerof(x); v = qzerof(x);
                     z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x);
Index: djgpp/src/libm/math/ef_j1.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libm/math/ef_j1.c,v
retrieving revision 1.1
diff -p -u -r1.1 ef_j1.c
--- djgpp/src/libm/math/ef_j1.c 1998/02/07 14:13:26     1.1
+++ djgpp/src/libm/math/ef_j1.c 2002/03/16 13:33:47
@@ -13,6 +13,7 @@
  * ====================================================
  */
 
+#include <stdlib.h>
 #include "fdlibm.h"
 
 #ifdef __STDC__
@@ -75,7 +76,7 @@ static float zero    = 0.0;
         * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
         * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
         */
-               if(ix>0x80000000U) z = (invsqrtpi*cc)/__ieee754_sqrtf(y);
+               if((__uint32_t)ix>0x80000000U) abort() /* Was: z = (invsqrtpi*cc
)/__ieee754_sqrtf(y) */ ;
                else {
                    u = ponef(y); v = qonef(y);
                    z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(y);


I didn't see any abort. What should we do now? Remove the if()
completely or leave the abort() in (for safety)?


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019