diff --git a/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h b/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h --- a/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h +++ b/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h @@ -21,9 +21,9 @@ namespace x86 { LIBC_INLINE void normalize(int &exponent, UInt128 &mantissa) { - const int shift = + const unsigned int shift = static_cast( unsafe_clz(static_cast(mantissa)) - - (8 * sizeof(uint64_t) - 1 - MantissaWidth::VALUE); + (8 * sizeof(uint64_t) - 1 - MantissaWidth::VALUE)); exponent -= shift; mantissa <<= shift; }