mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Fix -Werror=constant-logical-operand errors in soft-fp
Building for sparc64-linux-gnu with GCC mainline produces a series of -Werror=constant-logical-operand errors in soft-fp code, relating to calls to _FP_TO_INT where rsigned is -1 not 0 or 1. Use explicit != 0 in the soft-fp code to avoid these errors. Tested with build-many-glibcs.py (compilers and glibcs builds) for sparc64-linux-gnu with GCC mainline.
This commit is contained in:
+2
-2
@@ -1510,7 +1510,7 @@
|
||||
} \
|
||||
\
|
||||
if (_FP_EXPBIAS_##fs + (rsize) - 1 < _FP_EXPMAX_##fs \
|
||||
&& (rsigned) \
|
||||
&& (rsigned) != 0 \
|
||||
&& X##_s \
|
||||
&& X##_e == _FP_EXPBIAS_##fs + (rsize) - 1) \
|
||||
{ \
|
||||
@@ -1555,7 +1555,7 @@
|
||||
_FP_FRACBITS_##fs); \
|
||||
_FP_FRAC_ASSEMBLE_##wc ((r), X, (rsize)); \
|
||||
} \
|
||||
if ((rsigned) && X##_s) \
|
||||
if ((rsigned) != 0 && X##_s) \
|
||||
(r) = -(r); \
|
||||
if ((rsigned) == 2 && X##_e >= _FP_EXPBIAS_##fs + (rsize) - 1) \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user