On the DEC VAX, overflow could be set to trap, based on a bit mask at the beginning of each function, but that was not the case on the PDP-11.
Nobody used that feature. I once modified the C compiler for the VAX to make integer overflow trap, and rebuilt standard utilities. Most of them trapped on integer overflow.
If you want arithmetic to wrap, you should have to write something like
n := (n + 1) mod (2^32);
Let the optimizer figure out there's a cheap way to do that.
On the DEC VAX, overflow could be set to trap, based on a bit mask at the beginning of each function, but that was not the case on the PDP-11. Nobody used that feature. I once modified the C compiler for the VAX to make integer overflow trap, and rebuilt standard utilities. Most of them trapped on integer overflow.
If you want arithmetic to wrap, you should have to write something like
Let the optimizer figure out there's a cheap way to do that.