Work around bug of HP-UX 10.20 cc with -0.0 literal.
[gnulib.git] / tests / test-isnanf.h
index 7f6eb12..f3f387c 100644 (file)
     }                                                                       \
   while (0)
 
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
+   So we use -zero instead.  */
+float zero = 0.0f;
+
 int
 main ()
 {
@@ -45,7 +49,7 @@ main ()
   ASSERT (!isnanf (-2.718e30f));
   ASSERT (!isnanf (-2.718e-30f));
   ASSERT (!isnanf (0.0f));
-  ASSERT (!isnanf (-0.0f));
+  ASSERT (!isnanf (-zero));
   /* Infinite values.  */
   ASSERT (!isnanf (1.0f / 0.0f));
   ASSERT (!isnanf (-1.0f / 0.0f));