[libc-commits] [libc] [libc] Use int in a64l instead of int32_t. (PR #150034)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Tue Jul 22 10:08:50 PDT 2025
================
@@ -44,10 +42,10 @@ constexpr static int32_t b64_char_to_int(char ch) {
LLVM_LIBC_FUNCTION(long, a64l, (const char *s)) {
// the standard says to only use up to 6 characters.
constexpr size_t MAX_LENGTH = 6;
- int32_t result = 0;
+ int result = 0;
----------------
michaelrj-google wrote:
not necessarily. For these types we can't assume anything about their size other than what the standard says. If this variable needs to be 32 bits then `int` might not work on all systems. We should use `long` and limit it to 32 bits.
https://github.com/llvm/llvm-project/pull/150034
More information about the libc-commits
mailing list