diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-04-01 16:35:32 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-11-20 14:53:07 -0300 |
| commit | e6f50abbb623025fbe5b59211dc186653b7d1f05 (patch) | |
| tree | 8183ee0efec37ed580544fbdf9df6ba6a61cc892 | |
| parent | 177cc324eec89421c3107b54748d572f3b1b6d2d (diff) | |
math: Fix isgreater* and isless* for clang
clang does not check for unordered numbers with builtins for
_Float128 type.
It fixes multiple issues with math tests, such as:
Failure: fmax (0, qNaN): Exception "Invalid operation" set
Failure: fmax (0, -qNaN): Exception "Invalid operation" set
Failure: fmax (-0, qNaN): Exception "Invalid operation" set
Failure: fmax (-0, -qNaN): Exception "Invalid operation" set
Failure: fmax (9, qNaN): Exception "Invalid operation" set
Failure: fmax (9, -qNaN): Exception "Invalid operation" set
Failure: fmax (-9, qNaN): Exception "Invalid operation" set
Failure: fmax (-9, -qNaN): Exception "Invalid operation" set
| -rw-r--r-- | math/math.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/math/math.h b/math/math.h index 5f1933a2f9..8e904e5d93 100644 --- a/math/math.h +++ b/math/math.h @@ -1429,7 +1429,7 @@ iszero (__T __val) #endif #ifdef __USE_ISOC99 -# if __GNUC_PREREQ (3, 1) +# if __GNUC_PREREQ (3, 1) && !defined __clang__ /* ISO C99 defines some macros to compare number while taking care for unordered numbers. Many FPUs provide special instructions to support these operations. Generic support in GCC for these as builtins went |
