You could write it in C++ and use a checked_int class that traps all overflow. Or better, a bounded_int<1000> which stores a number between 0 and 1000 and throws an exception if you go outside that range - with some compile-time support for checking that arithmetic cannot overflow (e.g. adding two bounded_int<500>s produces a bounded_int<1000>, and can never overflow).
That doesn't in any way excuse the insane decision not to do overflow checking for standard integer types. The compiler should check overflow by default and offer an -funsafe-integer-overflow optimization switch for the small sections of performance-critical code where you want to turn it off.