[libc-commits] [libc] 0e3a17c - [libc][math] Fix gcc buildbot failure (#152320)

via libc-commits libc-commits at lists.llvm.org
Wed Aug 6 08:53:25 PDT 2025


Author: Krishna Pandey
Date: 2025-08-06T11:53:21-04:00
New Revision: 0e3a17c70d3f8bec3495a3331e134e361bb00928

URL: https://github.com/llvm/llvm-project/commit/0e3a17c70d3f8bec3495a3331e134e361bb00928
DIFF: https://github.com/llvm/llvm-project/commit/0e3a17c70d3f8bec3495a3331e134e361bb00928.diff

LOG: [libc][math] Fix gcc buildbot failure (#152320)

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>

Added: 
    

Modified: 
    libc/src/__support/FPUtil/generic/add_sub.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/FPUtil/generic/add_sub.h b/libc/src/__support/FPUtil/generic/add_sub.h
index bcc5647b3cdd5..b2e9d81f4774c 100644
--- a/libc/src/__support/FPUtil/generic/add_sub.h
+++ b/libc/src/__support/FPUtil/generic/add_sub.h
@@ -174,8 +174,8 @@ add_or_sub(InType x, InType y) {
     int alignment = (max_bits.get_biased_exponent() - max_bits.is_normal()) -
                     (min_bits.get_biased_exponent() - min_bits.is_normal());
 
-    InStorageType aligned_min_mant =
-        min_mant >> cpp::min(alignment, RESULT_MANTISSA_LEN);
+    InStorageType aligned_min_mant = static_cast<InStorageType>(
+        min_mant >> cpp::min(alignment, RESULT_MANTISSA_LEN));
     bool aligned_min_mant_sticky;
 
     if (alignment <= GUARD_BITS_LEN)


        


More information about the libc-commits mailing list