]> Savannah Git Hosting - gnulib.git/commit
intprops.h, xalloc-oversized.h: work with gcc 7
authorJim Meyering <meyering@fb.com>
Mon, 29 Aug 2016 16:45:18 +0000 (09:45 -0700)
committerJim Meyering <meyering@fb.com>
Mon, 29 Aug 2016 16:45:18 +0000 (09:45 -0700)
commit175b4e22f99e00996b72f822f5ae54dca8243d19
tree4bf03ab01b9a79e10b4df02109575ecf27d985c4
parentb9c364f02cb7a7485cd063fa2cbcbf82042fa8cc
intprops.h, xalloc-oversized.h: work with gcc 7

In gcc 6, __builtin_add_overflow, __builtin_sub_overflow and
__builtin_mul_overflow each accept a NULL pointer as the third
argument.  However in gcc 7, that is no longer accepted.
Instead, one must use the "_p"-suffixed names, with which, the
third parameter is no longer a pointer.
* lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): Correct
the definition: not true for gcc 7 and subsequent.
(_GL_HAS_BUILTIN_OVERFLOW_P): Define.
(_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
Provide new definitions for gcc 7 and subsequent.
* lib/xalloc-oversized.h (xalloc_oversized): Provide a definition
that works with gcc-7.
ChangeLog
lib/intprops.h
lib/xalloc-oversized.h