4 ms·
You're exaggerating a little, x+y is defined over signed ints as long as as it doesn't over/underflow. If it does overflow, it's either a target-specific hand
by bcoates 14y ago
You're exaggerating a little, x+y is defined over signed ints as long as as it doesn't over/underflow.
If it does overflow, it's either a target-specific hand optimization or a programmer error, but that varies on a program-by-program basis, hence GCC having -fwrapv, -ftrapv, and the default of "I don't do that, optimize accordingly".