From 152461f3e2ec9a9e6d7c232529b965ca16831736 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Aug 2000 18:29:19 +0000 Subject: (feenv_tests): Clear all exceptions before first test. (feexcp_nomask_test): Correct printf args. (feexcp_mask_test): Like. --- math/test-fenv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/math/test-fenv.c b/math/test-fenv.c index 03e4877761..d803f27808 100644 --- a/math/test-fenv.c +++ b/math/test-fenv.c @@ -350,8 +350,8 @@ feexcp_nomask_test (const char *flag_name, int fe_exc) int status; pid_t pid; - printf ("Test: after fedisable (%s) processes will abort\n"); - printf (" when feraiseexcept (%s) is called.\n", flag_name, flag_name); + printf ("Test: after fedisable (%s) processes will abort\n", flag_name); + printf (" when feraiseexcept (%s) is called.\n", flag_name); pid = fork (); if (pid == 0) { @@ -402,8 +402,8 @@ feexcp_mask_test (const char *flag_name, int fe_exc) int status; pid_t pid; - printf ("Test: after fedisable (%s) processes will not abort\n"); - printf (" when feraiseexcept (%s) is called.\n", flag_name, flag_name); + printf ("Test: after fedisable (%s) processes will not abort\n", flag_name); + printf (" when feraiseexcept (%s) is called.\n", flag_name); pid = fork (); if (pid == 0) { @@ -580,7 +580,7 @@ feenable_test (const char *flag_name, int fe_exc) } feexcp_nomask_test (flag_name, fe_exc); feexcp_mask_test (flag_name, fe_exc); - + } @@ -596,6 +596,9 @@ fe_single_test (const char *flag_name, int fe_exc) static void feenv_tests (void) { + /* We might have some exceptions still set. */ + feclearexcept (FE_ALL_EXCEPT); + #ifdef FE_DIVBYZERO fe_single_test ("FE_DIVBYZERO", FE_DIVBYZERO); #endif -- cgit v1.2.3