From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id C94E23858286; Tue, 4 Oct 2022 13:04:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C94E23858286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664888690; bh=lScnSoMFCgU9Bak6Ddcgf0WNaT+ogw60XMhfRI6NKk0=; h=From:To:Subject:Date:From; b=rkTuwsDSx7fW5DrV8o3S8AcXM7IKyZ1HmSIkZq4qV3iZ3sGaU+EDe9cjY0GL5jI4d 6tCKtsstGqRfMs49Y/CiI8uVWiy/SOwIE9XkM9UYFzWfvCVLfKiJdf/TUbQ6Yf9g9B AGWdOa5sKoX0OEn9SXV5YTsKoYXVQBX8Vz9xoyQQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] math: Do not use __builtin_isinf on clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 27761afb0d907970ee1c3a1e53ec72709b85d7c8 X-Git-Newrev: 56a7b34b82d11c0e25b102d026e9b5db97726428 Message-Id: <20221004130450.C94E23858286@sourceware.org> Date: Tue, 4 Oct 2022 13:04:50 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=56a7b34b82d11c0e25b102d026e9b5db97726428 commit 56a7b34b82d11c0e25b102d026e9b5db97726428 Author: Adhemerval Zanella Date: Fri Apr 1 17:03:34 2022 -0300 math: Do not use __builtin_isinf on clang It does not handle pseudo normal numbers. Diff: --- math/math.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/math/math.h b/math/math.h index 82e484b777..7afb6d32b9 100644 --- a/math/math.h +++ b/math/math.h @@ -1012,7 +1012,8 @@ enum /* Return nonzero value if X is positive or negative infinity. */ # if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \ - && !defined __SUPPORT_SNAN__ && !defined __cplusplus + && !defined __SUPPORT_SNAN__ && !defined __cplusplus \ + && !defined __clang__ /* Since __builtin_isinf_sign is broken for float128 before GCC 7.0, use the helper function, __isinff128, with older compilers. This is only provided for C mode, because in C++ mode, GCC has no support @@ -1021,8 +1022,7 @@ enum # define isinf(x) \ (__builtin_types_compatible_p (__typeof (x), _Float128) \ ? __isinff128 (x) : __builtin_isinf_sign (x)) -# elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ - || __glibc_clang_prereq (3,7) +# elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) # define isinf(x) __builtin_isinf_sign (x) # else # define isinf(x) __MATH_TG ((x), __isinf, (x))