You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
32b arm failed when enabling -Werror:
libc/src/string/memory_utils/utils.h:50:36: error: implicit conversion loses
integer precision: 'unsigned long long' to 'size_t' (aka 'unsigned int')
[-Werror,-Wshorten-64-to-32]
return value == 0 ? value : 1ULL << log2s(value);
~~~~~~ ~~~~~^~~~~~~~~~~~~~~
libc/src/string/memory_utils/utils.h:56:50: error: implicit conversion loses
integer precision: 'unsigned long long' to 'size_t' (aka 'unsigned int')
[-Werror,-Wshorten-64-to-32]
return is_power2_or_zero(value) ? value : 1ULL << (log2s(value) + 1);
~~~~~~ ~~~~~^~~~~~~~~~~~~~~~~~~~~
arm-linux-gnueabi is ILP32. size_t is an 'unsigned int' and 'long' is the same
bit width as `int`.
Use an unsigned long literal rather than an unsigned long long literal to avoid
the implicit promotion to unsigned long long which would then be truncated to
unsigned int, as hinted at by the warning.
Link: https://lab.llvm.org/buildbot/#/builders/229/builds/20596
0 commit comments