Mercurial > hg > octave-lojdl > gnulib-hg
changeset 8545:418f381347dc
Work around IRIX 6.5 cc compiler bug, which simplifies x != x to false.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 25 Mar 2007 20:58:03 +0000 |
parents | 245a3653b197 |
children | d03503ff8d69 |
files | ChangeLog modules/frexp-tests modules/frexpl-tests tests/test-frexp.c tests/test-frexpl.c |
diffstat | 5 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-03-25 Bruno Haible <bruno@clisp.org> + + * tests/test-frexpl.c: Include isnanl-nolibm.h. + (main): Use isnanl instead of x != x idiom. + * modules/frexpl-tests (Depends-on): Add isnanl-nolibm. + + * tests/test-frexp.c: Include isnan.h. + (main): Use isnan instead of x != x idiom. + * modules/frexp-tests (Depends-on): Add isnan-nolibm. + 2007-03-25 Bruno Haible <bruno@clisp.org> * tests/test-frexp.c (NaN): New function/macro.
--- a/modules/frexp-tests +++ b/modules/frexp-tests @@ -2,6 +2,7 @@ tests/test-frexp.c Depends-on: +isnan-nolibm configure.ac: AC_SUBST([FREXP_LIBM])
--- a/modules/frexpl-tests +++ b/modules/frexpl-tests @@ -3,6 +3,7 @@ Depends-on: fpucw +isnanl-nolibm configure.ac:
--- a/tests/test-frexp.c +++ b/tests/test-frexp.c @@ -24,6 +24,8 @@ #include <float.h> #include <stdlib.h> +#include "isnan.h" + #define ASSERT(expr) if (!(expr)) abort (); /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ @@ -64,7 +66,7 @@ double mantissa; x = NaN (); mantissa = frexp (x, &exp); - ASSERT (mantissa != mantissa); + ASSERT (isnan (mantissa)); } { /* Positive infinity. */
--- a/tests/test-frexpl.c +++ b/tests/test-frexpl.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include "fpucw.h" +#include "isnanl-nolibm.h" #define ASSERT(expr) if (!(expr)) abort (); @@ -52,7 +53,7 @@ long double mantissa; x = 0.0L / 0.0L; mantissa = frexpl (x, &exp); - ASSERT (mantissa != mantissa); + ASSERT (isnanl (mantissa)); } { /* Positive infinity. */