about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-24 15:14:35 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:40 -0300
commit4b7c2232917e57d3902213f387ac2bcd51f48d8f (patch)
treead53cf61fc03f4b04d17f72966bda901553081a0
parent96f8c9eefa06c2795aa3cfc689bfe801116d6221 (diff)
downloadglibc-4b7c2232917e57d3902213f387ac2bcd51f48d8f.tar.gz
glibc-4b7c2232917e57d3902213f387ac2bcd51f48d8f.tar.xz
glibc-4b7c2232917e57d3902213f387ac2bcd51f48d8f.zip
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);                             \
                             ^ ~~~~~
-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 5d64da8a91..aa88ba6369 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);