aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--math/test-misc.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dc3a445..d8994e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * math/test-misc.c (do_test) [LDBL_MANT_DIG > DBL_MANT_DIG]: Make
+ code using FE_UNDERFLOW conditional on [FE_UNDERFLOW], code using
+ FE_OVERFLOW conditional on [FE_OVERFLOW] and code using FE_UPWARD
+ conditional on [FE_UPWARD].
+
2018-08-01 Paul Eggert <eggert@cs.ucla.edu>
regex: fix memory leak in Gnulib
diff --git a/math/test-misc.c b/math/test-misc.c
index c5cfb34..963e1e7 100644
--- a/math/test-misc.c
+++ b/math/test-misc.c
@@ -976,11 +976,13 @@ do_test (void)
puts ("scalbl (LDBL_MIN, 2147483647) returns -Inf");
result = 1;
}
+# ifdef FE_UNDERFLOW
else if (fetestexcept (FE_UNDERFLOW))
{
puts ("scalbl (LDBL_MIN, 2147483647) raises underflow exception");
result = 1;
}
+# endif
feclearexcept (FE_ALL_EXCEPT);
r = scalbl (LDBL_MAX, -2147483647);
@@ -994,11 +996,13 @@ do_test (void)
puts ("scalbl (LDBL_MAX, -2147483647) returns -Inf");
result = 1;
}
+# ifdef FE_OVERFLOW
else if (fetestexcept (FE_OVERFLOW))
{
puts ("scalbl (LDBL_MAX, -2147483647) raises overflow exception");
result = 1;
}
+# endif
}
#endif
@@ -1178,6 +1182,7 @@ do_test (void)
}
}
+# ifdef FE_UPWARD
volatile long double ld7 = nextafterl (0.0L, 1.0L);
volatile double d7;
(void) &ld7;
@@ -1195,6 +1200,7 @@ do_test (void)
else
puts ("ignoring this failure");
}
+# endif
# endif
#endif