Skip to content

Commit 2e8fa86

Browse files
committed
[libc] Add explicit casts for gcc
1 parent d172842 commit 2e8fa86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/src/__support/str_to_float.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ eisel_lemire(typename fputil::FPBits<T>::UIntType mantissa, int32_t exp10,
153153
BitsType final_mantissa = static_cast<BitsType>(high64(final_approx) >>
154154
(msb + BITS_IN_MANTISSA -
155155
(fputil::FloatProperties<T>::MANTISSA_WIDTH + 3)));
156-
exp2 -= 1 ^ msb; // same as !msb
156+
exp2 -= static_cast<uint32_t>(1 ^ msb); // same as !msb
157157

158158
// Half-way ambiguity
159159
if (low64(final_approx) == 0 &&
@@ -259,7 +259,7 @@ inline bool eisel_lemire<long double>(
259259
final_approx_upper >>
260260
(msb + BITS_IN_MANTISSA -
261261
(fputil::FloatProperties<long double>::MANTISSA_WIDTH + 3));
262-
exp2 -= 1 ^ msb; // same as !msb
262+
exp2 -= static_cast<uint32_t>(1 ^ msb); // same as !msb
263263

264264
// Half-way ambiguity
265265
if (final_approx_lower == 0 && (final_approx_upper & HALFWAY_CONSTANT) == 0 &&

0 commit comments

Comments
 (0)