diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-04-15 17:46:03 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-04-15 17:46:03 +0200 |
commit | f8409c3109d2970a1fd63ac1a61601138b7ae46f (patch) | |
tree | 0491db96d7c6dfdf993ad9368cd56e76b9944e0c /libgcc | |
parent | 52972ab5c75634872b508806310dffd8c32933b9 (diff) | |
download | gcc-f8409c3109d2970a1fd63ac1a61601138b7ae46f.zip gcc-f8409c3109d2970a1fd63ac1a61601138b7ae46f.tar.gz gcc-f8409c3109d2970a1fd63ac1a61601138b7ae46f.tar.bz2 |
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.
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/config/m68k/fpgnulib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/config/m68k/fpgnulib.c b/libgcc/config/m68k/fpgnulib.c index 986750e..04f6299 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 { |