]> Savannah Git Hosting - gnulib.git/commit
xalloc-oversized: port to GCC 7; fewer warnings
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2016 18:17:03 +0000 (11:17 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2016 18:17:44 +0000 (11:17 -0700)
commit097a5928a785bae77ed1255e57b6553dd1912efe
treeb0a4a3d61167036522f731dec443309068d693aa
parent6dc5c2148c80205f630e2ca19e01cec0d946a949
xalloc-oversized: port to GCC 7; fewer warnings

GCC 7 will have a better way to deal with integer overflow.
Plus, fix a warnings problem reported by Tim Ruehsen in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-06/msg00022.html
* lib/xalloc-oversized.h (__xalloc_oversized): New macro.
(xalloc_oversized): Use plain __builtin_mul_overflow if GCC 7 or later.
For GCC 5, use __xalloc_oversized if both args are constants,
or if pedantic.
ChangeLog
lib/xalloc-oversized.h