On Mon, 28 Sep 2026, Richard Biener wrote: > removing possible traps with -ftrapv was always considered OK - the > point of TYPE_OVERFLOW_TRAPS checks should be to prevent new traps > from being introduced where none were there before.
Thanks, that settles it. The fold only drops the C2 - X or -X operand and adds no operation that can trap, so it is fine as it is; I withdraw this patch. The sanitizer case Jeff and Andrea raise is already covered: all four matchers check TYPE_OVERFLOW_SANITIZED. Dominic
