diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-07 15:09:53 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-11-01 09:46:08 -0300 |
commit | 5c5a8b99cf96b71940e36a9db66d3a61bc315016 (patch) | |
tree | 7396885b3487d9383bf477219a79ebcf68b64d9f /math/test-snan.c | |
parent | 6ee5a9767a245455720d39eeaa3ce136825e8a42 (diff) | |
download | glibc-5c5a8b99cf96b71940e36a9db66d3a61bc315016.tar.gz glibc-5c5a8b99cf96b71940e36a9db66d3a61bc315016.tar.xz glibc-5c5a8b99cf96b71940e36a9db66d3a61bc315016.zip |
Disable use of -fsignaling-nans if compiler does not support it
Reviewed-by: Fangrui Song <maskray@google.com>
Diffstat (limited to 'math/test-snan.c')
-rw-r--r-- | math/test-snan.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/math/test-snan.c b/math/test-snan.c index 4d7bd54ade..fadde89764 100644 --- a/math/test-snan.c +++ b/math/test-snan.c @@ -25,8 +25,10 @@ #include <setjmp.h> #include <math-tests.h> +#include <support/check.h> +#ifdef __SUPPORT_SNAN__ static sigjmp_buf sigfpe_buf; static void @@ -123,10 +125,12 @@ NAME (void) \ TEST_FUNC (float_test, float, f) TEST_FUNC (double_test, double, ) TEST_FUNC (ldouble_test, long double, l) +#endif static int do_test (void) { +#ifdef __SUPPORT_SNAN__ signal (SIGFPE, &myFPsighandler); float_test (); @@ -134,7 +138,9 @@ do_test (void) ldouble_test (); return errors != 0; +#else + FAIL_UNSUPPORTED ("compiler does not support -fsignaling-nans"); +#endif } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include <support/test-driver.c> |