[glibc/azanella/clang] math: Fix test-totalorderl-ldbl-96 exponent setting
Adhemerval Zanella
azanella@sourceware.org
Thu Feb 9 19:50:30 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=99b4a2da1cfc4b159922ecde3e30a8a96ebfec5a
commit 99b4a2da1cfc4b159922ecde3e30a8a96ebfec5a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 24 15:14:35 2022 -0300
math: Fix test-totalorderl-ldbl-96 exponent setting
Clang issues the following warning:
../sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c:49:2: error:
implicit truncation from 'int' to bit-field changes value from 65535 to
-1 [-Werror,-Wbitfield-constant-conversion]
SET_LDOUBLE_WORDS (ldnx, 0xffff,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86_64/fpu/math_ldbl.h:56:28: note: expanded from macro
'SET_LDOUBLE_WORDS'
iw_u.parts.sign_exponent = (exp); \
^ ~~~~~
../sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c:51:2: error:
implicit truncation from 'int' to bit-field changes value from 65535 to
-1 [-Werror,-Wbitfield-constant-conversion]
SET_LDOUBLE_WORDS (ldny, 0xffff,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86_64/fpu/math_ldbl.h:56:28: note: expanded from macro
'SET_LDOUBLE_WORDS'
iw_u.parts.sign_exponent = (exp); \
^ ~~~~~
Diff:
---
sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c b/sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c
index ce0fc3d25b..159d64155e 100644
--- a/sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c
+++ b/sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c
@@ -46,9 +46,9 @@ do_test (void)
SET_LDOUBLE_WORDS (ldy, 0x7fff,
(tests[i] >> 32) | 0x80000000,
tests[i] & 0xffffffffULL);
- SET_LDOUBLE_WORDS (ldnx, 0xffff,
+ SET_LDOUBLE_WORDS (ldnx, -1,
tests[i] >> 32, tests[i] & 0xffffffffULL);
- SET_LDOUBLE_WORDS (ldny, 0xffff,
+ SET_LDOUBLE_WORDS (ldny, -1,
(tests[i] >> 32) | 0x80000000,
tests[i] & 0xffffffffULL);
bool to1 = totalorderl (&ldx, &ldy);
More information about the Glibc-cvs
mailing list