https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66630
Bug ID: 66630 Summary: Missing ubsan/ftrapv error Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- int main (void) { int i = -__INT_MAX__ - 1; int j = -i - 1; return j; } $ xgcc -fsanitize=undefined a.c; ./a.out says nothing :(. We should report the overflow when computing -i.