Open nickdesaulniers opened 1 week ago
@llvm/issue-subscribers-libc
Author: Nick Desaulniers (nickdesaulniers)
cc @overmighty this was introduced by b5efd214297a5. Should we perhaps be using uint64_t
(or long long
) here? i386 is ILP32, so sizeof(long)
== sizeof(int)
.
cc @overmighty this was introduced by b5efd214297a5. Should we perhaps be using
uint64_t
(orlong long
) here? i386 is ILP32, sosizeof(long)
==sizeof(int)
.
Sure. I remember getting those warnings, I guess it was while testing on 32-bit Arm. I didn't immediately fix it because it shouldn't be a problem in practice due to the if (/* ... */) return;
before that line, but obviously it would be nice to compile without warnings.
Right, that return won't prevent semantic analysis from flagging type related issues. Perhaps rather than an early return, we should just use preprocessor guards to include the relevant tests on LP64 only targets?
Sure, but we should keep the if constexpr (sizeof(U) < sizeof(long))
part of the early return to avoid testing func
with a long
when it takes an int
.
building for i386: