Also, the UB can be mitigated with -fwrapv (if desired) to handle overflowing integers with 2's complement
This would be possible only if the standard would define the behavior in question as implementation defined. But that's not the case afaik.
Signed overflow is undefined behavior as it's afaik defined to be that. But maybe I'm just wrong here?
But at least SO is confining my knowledge:
https://stackoverflow.com/questions/16188263/is-signed-integ...