[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 14:23:45 PST 2023


================
@@ -548,7 +550,8 @@ class FloatToString {
 
       val = POW10_SPLIT_2[p];
 #endif
-      const int32_t shift_amount = SHIFT_CONST + (-exponent - IDX_SIZE * idx);
+      const int32_t shift_amount =
+          static_cast<int32_t>(SHIFT_CONST + (-exponent - IDX_SIZE * idx));
----------------
nickdesaulniers wrote:

Sorry, I think I merged this in https://github.com/llvm/llvm-project/pull/74369. I wonder what page I was looking at where I didn't observe warnings on the above?

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


More information about the libc-commits mailing list