https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94934
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Gabriel Ravier from comment #3) > In that case, it looks really easy to reimplemnet `-ftrapv` as literally > just enabling `-fsanitize=signed-integer-overflow > -fsanitize-undefined-trap-on-error`. It shouldn't be literally that, because -ftrapv should be able to coexist with other UBSan sanitizers (just not signed-integer-overflow) and e.g. let the other UBSan sanitizers have different decision on what to do on error (the trap. vs. fatal error vs. just diagnostics and continue). And for -ftrapv we should consider using the library functions rather than emitting code inline if it would be too large to match past behavior.