Jeffrey Walton wrote: > You might also checkout an overflow library. For the C language, > safe_iop is available.
Gnulib's INT_*_WRAPV macros are similar. [1] > -ftrapv is for defective programs. A program using -ftrapv is still > defective and should be fixed. You mean, '-fwrapv' is for defective programs? Bruno [1] https://www.gnu.org/software/gnulib/manual/html_node/Wraparound-Arithmetic.html