aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--math/test-fenv-preserve.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 79d3dbf2a4..f9df74509b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-11 Chris Metcalf <cmetcalf@tilera.com>
+
+ * math/test-fenv-preserve.c [FE_ALL_EXCEPT == 0] (do_test):
+ Make the test a no-op if there are no exceptions defined.
+
2014-04-11 Paul Pluzhnikov <ppluzhnikov@google.com>
* elf/Makefile (tests): make tst-dlopen-atout conditional on
diff --git a/math/test-fenv-preserve.c b/math/test-fenv-preserve.c
index 8288b2c971..89f2e2bd81 100644
--- a/math/test-fenv-preserve.c
+++ b/math/test-fenv-preserve.c
@@ -22,6 +22,7 @@
static int
do_test (void)
{
+#if FE_ALL_EXCEPT
fenv_t env;
if (feenableexcept (FE_INVALID) != 0)
@@ -47,6 +48,10 @@ do_test (void)
printf ("fegetexcept returned %d, expected %d\n", ret, FE_INVALID);
return 1;
}
+#else
+ puts ("No exceptions defined, cannot test");
+ return 0;
+#endif
}
#define TEST_FUNCTION do_test ()