aboutsummaryrefslogtreecommitdiff
path: root/math/test-fenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/test-fenv.c')
-rw-r--r--math/test-fenv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/math/test-fenv.c b/math/test-fenv.c
index 39c7c33..19e5415 100644
--- a/math/test-fenv.c
+++ b/math/test-fenv.c
@@ -664,9 +664,11 @@ feholdexcept_tests (void)
}
#endif
test_exceptions ("feholdexcept_tests 0 test", NO_EXC, 0);
+#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
test_exceptions ("feholdexcept_tests FE_INVALID test",
INVALID_EXC, 0);
+#endif
res = feupdateenv (&saved);
if (res != 0)
{
@@ -684,7 +686,9 @@ feholdexcept_tests (void)
test_exceptions ("feholdexcept_tests FE_DIVBYZERO|FE_INVALID test",
DIVBYZERO_EXC | INVALID_EXC, 0);
feclearexcept (FE_ALL_EXCEPT);
+#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
+#endif
#if defined FE_TONEAREST && defined FE_UPWARD
res = fesetround (FE_UPWARD);
if (res != 0)
@@ -708,9 +712,11 @@ feholdexcept_tests (void)
}
#endif
test_exceptions ("feholdexcept_tests 0 2nd test", NO_EXC, 0);
+#ifdef FE_INEXACT
feraiseexcept (FE_INEXACT);
test_exceptions ("feholdexcept_tests FE_INEXACT test",
INEXACT_EXC, 0);
+#endif
res = feupdateenv (&saved2);
if (res != 0)
{