diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/fsetexcptflg.c | 5 | ||||
-rw-r--r-- | math/test-fexcept.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/math/fsetexcptflg.c b/math/fsetexcptflg.c index 2e8237e..e79095b 100644 --- a/math/fsetexcptflg.c +++ b/math/fsetexcptflg.c @@ -23,8 +23,9 @@ int __fesetexceptflag (const fexcept_t *flagp, int excepts) { - /* This always fails unless nothing needs to be done. */ - return (excepts != 0); + /* This always succeeds, as all exceptions are always clear + (including in the saved state) so nothing needs to be done. */ + return 0; } #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) diff --git a/math/test-fexcept.c b/math/test-fexcept.c index 6aa54b4..8540801 100644 --- a/math/test-fexcept.c +++ b/math/test-fexcept.c @@ -61,7 +61,13 @@ test_set (int initial, const fexcept_t *saved, int mask, int expected) if (ret != 0) { puts ("feraiseexcept failed"); - result = 1; + if (initial == 0 || EXCEPTION_TESTS (float)) + { + puts ("failure of feraiseexcept was unexpected"); + result = 1; + } + else + puts ("failure of feraiseexcept OK, skipping further tests"); return result; } ret = fesetexceptflag (saved, mask); |