X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-isnand.h;h=09c5e97768d578e1f9dbceed1cabb8d0f07b220d;hb=24208770c8721323060207c9be83dd24400678d3;hp=cf8cb5d4ba8794e6f19dc9e1126a0547ae20804a;hpb=fc11af0a623e95f1c0dc57aa56c134e380752770;p=gnulib.git diff --git a/tests/test-isnand.h b/tests/test-isnand.h index cf8cb5d4b..09c5e9776 100644 --- a/tests/test-isnand.h +++ b/tests/test-isnand.h @@ -34,6 +34,10 @@ } \ while (0) +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. + So we use -zero instead. */ +double zero = 0.0; + int main () { @@ -45,7 +49,7 @@ main () ASSERT (!isnand (-2.718e30)); ASSERT (!isnand (-2.718e-30)); ASSERT (!isnand (0.0)); - ASSERT (!isnand (-0.0)); + ASSERT (!isnand (-zero)); /* Infinite values. */ ASSERT (!isnand (1.0 / 0.0)); ASSERT (!isnand (-1.0 / 0.0));