[libc-commits] [libc] [libc][NFC] Clean up conversion warnings in math function implementations. (PR #74697)

via libc-commits libc-commits at lists.llvm.org
Thu Dec 7 09:50:50 PST 2023


================
@@ -178,7 +178,7 @@ LIBC_INLINE T hypot(T x, T y) {
   // But before that, remember to store the losing bits to sticky.
   // The shift length is for a^2 and b^2, so it's double of the exponent
   // difference between a and b.
-  uint16_t shift_length = 2 * (a_exp - b_exp);
+  uint16_t shift_length = uint16_t{2} * (a_exp - b_exp);
----------------
michaelrj-google wrote:

should these braces be parentheses?

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


More information about the libc-commits mailing list