[libc-commits] [libc] [libc] Fix recently introduced integer-type warnings (PR #125864)

Lucas Duarte Prates via libc-commits libc-commits at lists.llvm.org
Wed Feb 5 08:05:00 PST 2025


================
@@ -604,7 +604,7 @@ approx_reciprocal(const DyadicFloat<Bits> &a) {
   // of correct bits in x' is double the number in x.
 
   // An initial approximation to the reciprocal
-  DyadicFloat<Bits> x(Sign::POS, -32 - a.exponent - Bits,
+  DyadicFloat<Bits> x(Sign::POS, -32 - a.exponent - int(Bits),
----------------
pratlucas wrote:

Sounds good! I thought the conversion would be safe in any reasonable use-case, but thought it was better to double-check anyway.
Thanks for confirming.

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


More information about the libc-commits mailing list