[Bug middle-end/123271] -ftrapv fails to detect overflow on ARM32 since GCC 10

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 23 03:12:31 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123271

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
-ftrapv has been known to be broken for many years. These days you can use
-fsanitize=undefined and -fsanitize-trap to get a similar effect.


More information about the Gcc-bugs mailing list