]> Savannah Git Hosting - gnulib.git/commit
intprops: Add INT_ADD_OK etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Dec 2020 23:54:22 +0000 (15:54 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Dec 2020 01:35:34 +0000 (17:35 -0800)
commitc3545bdddacc4974fff87f3f2632c03e96ebbf05
tree3e754830dcbe54ae6f994d99162822d0ceff18fc
parent496a4a00494119db97a7930dbde96f87d0a73aef
intprops: Add INT_ADD_OK etc.

* doc/intprops.texi (Checking Integer Overflow): New section.
* lib/intprops.h: From a suggestion by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2020-12/msg00051.html
(SAFE_INT_ADD, SAFE_INT_SUBTRACT, SAFE_INT_MULTIPLY): New macros.
ChangeLog
doc/intprops.texi
lib/intprops.h