aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-17 05:50:47 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-18 01:54:26 +0800
commit54fe008ba66b2575fb1815f3d5e0811a0107a00c (patch)
tree10ee5f75873be9e9350489f1526ef610b04aa241 /sysdeps
parentd4ee46b0cd43012d311e07f11ee960efec3f1a94 (diff)
downloadglibc-54fe008ba66b2575fb1815f3d5e0811a0107a00c.zip
glibc-54fe008ba66b2575fb1815f3d5e0811a0107a00c.tar.gz
glibc-54fe008ba66b2575fb1815f3d5e0811a0107a00c.tar.bz2
ldbl-96: Set -1 to "int sign_exponent:16"
ieee_long_double_shape_type has typedef union { long double value; struct { ... int sign_exponent:16; ... } parts; } ieee_long_double_shape_type; Clang issues an error: ../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] 49 | SET_LDOUBLE_WORDS (ldnx, 0xffff, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 | tests[i] >> 32, tests[i] & 0xffffffffULL); | Use -1, instead of 0xffff, to silence Clang. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c4
1 files 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 5d64da8..aa88ba6 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);