Adhemerval Zanella
|
602fdf5d69
|
include: Sync gnulib intprops
It syncs with gnulib commit 1790ef25d81983d1d25a77d452c0080345df459b.
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.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
2025-10-29 12:53:50 -03:00 |
|