https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88646
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- If you want signed integer overflow to be defined and be the same between different variables then use -fwrapv . Under defined behavior means gcc could produce this behavior. If you want to detect this behavior at runtime you can use -fsantizer=undefined option.