[Bug c/87311] missing integer overflow detection on negation of the minimum value with -ftrapv or UB sanitizer
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 17 10:44:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87311
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, I think we have quite some opportunistic replacement of traps by "correct"
results (according to twos complement). -ftrapv is not getting much love and
generally we recommend to use sanitizers these days. Elsewhere it was
suggested
to lower -ftrapv code to __builtin_()s.
More information about the Gcc-bugs
mailing list