about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-04-01 17:01:22 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:41 -0300
commitfa7fa397d3090a4d7883439140d50ae1f6f8617b (patch)
treeada0016222e0a67644f1c4dbd53866a3c4a7d335
parentb04dd4757fb4fcd8f6fc2ca21bf065992390d3a9 (diff)
downloadglibc-fa7fa397d3090a4d7883439140d50ae1f6f8617b.tar.gz
glibc-fa7fa397d3090a4d7883439140d50ae1f6f8617b.tar.xz
glibc-fa7fa397d3090a4d7883439140d50ae1f6f8617b.zip
math: Do not use __builtin_isnan on clang
It does not handle pseudo normal numbers.
-rw-r--r--math/math.h3
-rw-r--r--sysdeps/ieee754/float128/float128_private.h2
-rw-r--r--sysdeps/ieee754/float128/s_isnanf128.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/math/math.h b/math/math.h
index 97e4df863e..59caf4b7e6 100644
--- a/math/math.h
+++ b/math/math.h
@@ -1004,8 +1004,7 @@ enum
 
 /* Return nonzero value if X is a NaN.  We could use `fpclassify' but
    we already have this functions `__isnan' and it is faster.  */
-# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \
-     || __glibc_clang_prereq (2,8)
+# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__)
 #  define isnan(x) __builtin_isnan (x)
 # else
 #  define isnan(x) __MATH_TG ((x), __isnan, (x))
diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h
index 38a8bdd0fe..672bf3cccf 100644
--- a/sysdeps/ieee754/float128/float128_private.h
+++ b/sysdeps/ieee754/float128/float128_private.h
@@ -352,7 +352,7 @@
 #define frexpl frexpf128
 #define getpayloadl getpayloadf128
 #define isinfl isinff128_do_not_use
-#define isnanl isnanf128_do_not_use
+#define isnanl isnanf128
 #define ldexpl ldexpf128
 #define llrintl llrintf128
 #define llroundl llroundf128
diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c
index 59f71533ce..b73a4e80d7 100644
--- a/sysdeps/ieee754/float128/s_isnanf128.c
+++ b/sysdeps/ieee754/float128/s_isnanf128.c
@@ -11,7 +11,11 @@
 #include "../ldbl-128/s_isnanl.c"
 #if !IS_IN (libm)
 #include <float128-abi.h>
+#ifdef SHARED
 hidden_ver (__isnanf128_impl, __isnanf128)
+#else
+strong_alias (__isnanf128_impl, __isnanf128)
+#endif
 _weak_alias (__isnanf128_impl, isnanl)
 versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34);
 #if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34))