[libc-commits] [libc] [libc][NFC] fix int warnings in float conversion (PR #74379)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Dec 4 16:20:48 PST 2023


================
@@ -290,7 +290,7 @@ LIBC_INLINE cpp::UInt<MID_INT_SIZE> get_table_negative(int exponent, size_t i) {
     } else {
       ten_blocks = 0;
       five_blocks = i;
-      shift_amount = static_cast<int>(shift_amount + (i * BLOCK_SIZE));
+      shift_amount = shift_amount + (static_cast<int>(i) * BLOCK_SIZE);
----------------
nickdesaulniers wrote:

I think you can remove the parens here now; operator precedence

here and below, there seems to be excess parens?

https://github.com/llvm/llvm-project/pull/74379


More information about the libc-commits mailing list