This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] math: make test-fenv-preserve.c a no-op if FE_ALL_EXCEPT == 0.
- From: Chris Metcalf <cmetcalf at tilera dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: David Holsgrove <david dot holsgrove at xilinx dot com>
- Date: Fri, 11 Apr 2014 13:03:12 -0400
- Subject: [COMMITTED PATCH] math: make test-fenv-preserve.c a no-op if FE_ALL_EXCEPT == 0.
- Authentication-results: sourceware.org; auth=none
There were no objections raised to the previous version of this change
and it only affects tile and (I believe) microblaze, so I tweaked it
slightly to use "#if" rather than "#ifdef" and pushed it.
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.
This fixes a testsuite failure for tile (and possibly microblaze).
diff --git a/math/test-fenv-preserve.c b/math/test-fenv-preserve.c
index 8288b2c97159..89f2e2bd81e3 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 ()
--
1.8.3.1