public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] math: Fix test-totalorderl-ldbl-96 exponent setting
Date: Wed,  7 Feb 2024 14:09:17 +0000 (GMT)	[thread overview]
Message-ID: <20240207140918.05B073858434@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3e00404024952ec5cd46f3add9405ea95472004b

commit 3e00404024952ec5cd46f3add9405ea95472004b
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 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);

             reply	other threads:[~2024-02-07 14:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 14:09 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:55 Adhemerval Zanella
2024-02-09 17:33 Adhemerval Zanella
2024-01-29 17:59 Adhemerval Zanella
2023-12-21 18:56 Adhemerval Zanella
2023-09-28 17:54 Adhemerval Zanella
2023-08-30 12:38 Adhemerval Zanella
2023-02-09 19:50 Adhemerval Zanella
2022-10-28 17:43 Adhemerval Zanella
2022-10-04 13:01 Adhemerval Zanella
2022-06-09 21:22 Adhemerval Zanella
2022-06-09 13:18 Adhemerval Zanella
2022-06-03 14:08 Adhemerval Zanella
2022-05-13 14:21 Adhemerval Zanella
2022-05-12 19:35 Adhemerval Zanella
2022-05-10 18:26 Adhemerval Zanella
2022-04-29 14:06 Adhemerval Zanella
2022-04-04 12:56 Adhemerval Zanella
2022-03-31 19:08 Adhemerval Zanella
2022-03-29 20:31 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240207140918.05B073858434@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).