X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-isnanl.h;h=d89719031d5e34bafee5d827427c89e6156c46b8;hb=e6bf8b0764b43ff4ce477b80187a3765b6d2135b;hp=657948c94305cfadeeddca9ea5ee2c1ce71bfe22;hpb=6e2c5ce9d2220c2be7d35a0be15e9e6827305476;p=gnulib.git diff --git a/tests/test-isnanl.h b/tests/test-isnanl.h index 657948c94..d89719031 100644 --- a/tests/test-isnanl.h +++ b/tests/test-isnanl.h @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,11 +27,16 @@ if (!(expr)) \ { \ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ abort (); \ } \ } \ while (0) +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0L. + So we use -zero instead. */ +long double zero = 0.0L; + int main () { @@ -48,7 +53,7 @@ main () ASSERT (!isnanl (-2.718e30L)); ASSERT (!isnanl (-2.718e-30L)); ASSERT (!isnanl (0.0L)); - ASSERT (!isnanl (-0.0L)); + ASSERT (!isnanl (-zero)); /* Infinite values. */ ASSERT (!isnanl (1.0L / 0.0L)); ASSERT (!isnanl (-1.0L / 0.0L));