public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9976] m68k: Quiet up cppcheck warning [PR114689]
@ 2024-04-15 15:46 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2024-04-15 15:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f8409c3109d2970a1fd63ac1a61601138b7ae46f
commit r14-9976-gf8409c3109d2970a1fd63ac1a61601138b7ae46f
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Apr 15 17:46:03 2024 +0200
m68k: Quiet up cppcheck warning [PR114689]
cppcheck apparently warns on the | !!sticky part of the expression and
using | (!!sticky) quiets it up (it is correct as is).
The following patch adds the ()s, and also adds them around mant >> 1 just
in case it makes it clearer to all readers that the expression is parsed
that way already.
2024-04-15 Jakub Jelinek <jakub@redhat.com>
PR libgcc/114689
* config/m68k/fpgnulib.c (__truncdfsf2): Add parentheses around
!!sticky bitwise or operand to quiet up cppcheck. Add parentheses
around mant >> 1 bitwise or operand.
Diff:
---
libgcc/config/m68k/fpgnulib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgcc/config/m68k/fpgnulib.c b/libgcc/config/m68k/fpgnulib.c
index 986750e0523..04f62998f6e 100644
--- a/libgcc/config/m68k/fpgnulib.c
+++ b/libgcc/config/m68k/fpgnulib.c
@@ -302,7 +302,7 @@ __truncdfsf2 (double a1)
if (exp == EXPDMASK - EXCESSD + EXCESS)
{
exp = EXPMASK;
- mant = mant >> 1 | (mant & 1) | !!sticky;
+ mant = (mant >> 1) | (mant & 1) | (!!sticky);
}
else
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-15 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 15:46 [gcc r14-9976] m68k: Quiet up cppcheck warning [PR114689] Jakub Jelinek
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).