[PATCH v2 01/28] include: Sync gnulib intprops
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Oct 29 13:29:45 GMT 2025
On 28/10/25 23:32, Collin Funk wrote:
> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
>
>> The main change is to proper support clang by using builtins. It
>> fixes a sprof build issue, where previous version uses the generic
>> code path when building with clang:
>>
>> sprof.c:682:8: error: result of comparison of constant 288230376151711743 with expression of type 'Elf64_Half' (aka 'unsigned short') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>> 682 | if (INT_MULTIPLY_WRAPV (ehdr2.e_shnum, sizeof (ElfW(Shdr)), &size))
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../include/intprops.h:415:34: note: expanded from macro 'INT_MULTIPLY_WRAPV'
>> 415 | _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../include/intprops.h:504:45: note: expanded from macro '_GL_INT_OP_WRAPV'
>> 504 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
>> ../include/intprops.h:511:41: note: expanded from macro '_GL_INT_OP_WRAPV_LONGISH'
>> 511 | : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 512 | unsigned long int, 0, ULONG_MAX)) \
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../include/intprops.h:533:4: note: expanded from macro '_GL_INT_OP_CALC'
>> 533 | (overflow (a, b, tmin, tmax) \
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ../include/intprops.h:608:22: note: expanded from macro '_GL_INT_MULTIPLY_RANGE_OVERFLOW'
>> 608 | : (tmax) / (b) < (a)))
>> | ~~~~~~~~~~~~ ^ ~~~
>> 1 error generated.
>> ---
>> include/intprops-internal.h | 396 ++++++++++++++++++++++++++++++++++++
>> include/intprops.h | 368 ++++-----------------------------
>> 2 files changed, 432 insertions(+), 332 deletions(-)
>> create mode 100644 include/intprops-internal.h
>
> Cool, looks good. Can you just amend this commit to update the dates in
> SHARED-FILES? It would probably be good to include the commit hash as
> well.
Ack.
>
> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
>
> Collin
More information about the Libc-alpha
mailing list