2 ms·
VAXen did that. Integer overflow checking could be enabled on a per-function basis by setting the entry mask read by the CALL function at function entry.[1] Ho
by Animats 11y ago
VAXen did that. Integer overflow checking could be enabled on a per-function basis by setting the entry mask read by the CALL function at function entry.[1] However, you couldn't configure this for C's "unsigned overflow OK, signed overflow is an error" semantics. There was only one bit for enabling integer overflow detection. (You could also enable decimal overflow detection, in the unlikely event you were using the base 10 arithmetic instructions.) Overflow caused an exception at the machine level, which UNIX got as a signal.
I once rebuilt the UNIX tools on a VAX with the integer overflow detection bit set. About half of them still worked.
[1] http://odl.sysworks.biz/disk$axpdocmar981/opsys/vmsos71/ovms_71_vax_macro_ref.p283.bkb http://odl.sysworks.biz/disk$axpdocmar981/opsys/vmsos71/ovms...