From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 05B073858434; Wed, 7 Feb 2024 14:09:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05B073858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314958; bh=5L66Rp6HXm8IZziQMgXzj5EPen1HB/CBfzuP97Dcyh0=; h=From:To:Subject:Date:From; b=SDmYpLnQdoODJ3kETUUK5vd0sI+z43nnC7AV5oVUVyustxvl59B/0fzYJfaFykIrW KuP6e8mi7NCVr7j2daXAH6H0YIx5Dwv9SQktvGhZNVbfK+dxxZlTfqm0lpKoCBkX5L Z+1EWD6JHBU7a3DKHHv1yb6jY8ZBZ0W59GQ+ATuk= 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: Fix test-totalorderl-ldbl-96 exponent setting X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 09e214a177ab4795475c0a2f3ba0a136e7d2ebbc X-Git-Newrev: 3e00404024952ec5cd46f3add9405ea95472004b Message-Id: <20240207140918.05B073858434@sourceware.org> Date: Wed, 7 Feb 2024 14:09:17 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3e00404024952ec5cd46f3add9405ea95472004b commit 3e00404024952ec5cd46f3add9405ea95472004b Author: Adhemerval Zanella 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);