Work around bug of HP-UX 10.20 cc with -0.0 literal.
[gnulib.git] / tests / test-frexp.c
index 5d95063..0cd0823 100644 (file)
     }                                                                       \
   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;
+
 static double
 my_ldexp (double x, int d)
 {
@@ -102,7 +106,7 @@ main ()
   { /* Negative zero.  */
     int exp = -9999;
     double mantissa;
-    x = -0.0;
+    x = -zero;
     mantissa = frexp (x, &exp);
     ASSERT (exp == 0);
     ASSERT (mantissa == x);