[libc-commits] [libc] [libc] Fix arm32 build error. (PR #96997)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 27 20:18:07 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (lntue)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/96997.diff


1 Files Affected:

- (modified) libc/src/__support/high_precision_decimal.h (+2-1) 


``````````diff
diff --git a/libc/src/__support/high_precision_decimal.h b/libc/src/__support/high_precision_decimal.h
index 2c5a349e4495e..9524edf470903 100644
--- a/libc/src/__support/high_precision_decimal.h
+++ b/libc/src/__support/high_precision_decimal.h
@@ -409,7 +409,8 @@ class HighPrecisionDecimal {
       result *= 10;
       ++cur_digit;
     }
-    return result + this->should_round_up(this->decimal_point, round);
+    return result + static_cast<T>(static_cast<unsigned>(
+                        this->should_round_up(this->decimal_point, round)));
   }
 
   // Extra functions for testing.

``````````

</details>


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


More information about the libc-commits mailing list