[glibc/azanella/clang] math: Do not use __builtin_fpclassify on clang
Adhemerval Zanella
azanella@sourceware.org
Tue Apr 2 15:58:55 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c6e8beb01e28aad248e9ea1e37db98c5b5d58fb
commit 9c6e8beb01e28aad248e9ea1e37db98c5b5d58fb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Apr 1 16:54:55 2022 -0300
math: Do not use __builtin_fpclassify on clang
It does not handle pseudo normal numbers.
Diff:
---
math/math.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/math/math.h b/math/math.h
index e1d266f4b3..97e4df863e 100644
--- a/math/math.h
+++ b/math/math.h
@@ -955,8 +955,7 @@ enum
the __SUPPORT_SNAN__ check may be skipped for those versions. */
/* Return number of classification appropriate for X. */
-# if ((__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
- || __glibc_clang_prereq (2,8)) \
+# if ((__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__)) \
&& (!defined __OPTIMIZE_SIZE__ || defined __cplusplus)
/* The check for __cplusplus allows the use of the builtin, even
when optimization for size is on. This is provided for
@@ -997,8 +996,7 @@ enum
# endif
/* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */
-# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
- || __glibc_clang_prereq (2,8)
+# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__)
# define isnormal(x) __builtin_isnormal (x)
# else
# define isnormal(x) (fpclassify (x) == FP_NORMAL)
More information about the Glibc-cvs
mailing list