Bernhard Voelker wrote:
> I'd document that the caller has to free the returned memory later;
> so at least here in the module description, but maybe also in the
> header and - as it serves as example code - in the test.
Good point. I did this in the header and in the example code.
Also added a c
Eli Zaretskii wrote:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37006
Thanks for reporting that bug. I fixed it by installing the attached into
Gnulib. While working on the fix I discovered and reported a bug in GCC's
integer-overflow builtins: see:
https://gcc.gnu.org/bugzilla/show_b
* lib/intprops.h (_GL_BUILTIN_MUL_OVERFLOW):
Pacify GCC’s complaints about ignoring __builtin_mul_overflow’s
possibly-incorrect result.
(_GL_INT_MULTIPLY_RANGE_OVERFLOW): Pacify GCC’s complaints
about (A) used as a boolean, when A is an expression like 3 * 4.
---
ChangeLog | 7 +++
lib/in
* lib/intprops.h (_GL_INT_OP_WRAPV_SMALLISH): New macro, defined
when __builtin_add_overflow etc. and _Generic are not used.
(_GL_INT_OP_WRAPV): Use it to support destinations that
are unsigned char or unsigned short, even in compilers
that lack __typeof__ and are not C11-compatible.
---
ChangeLog