Now the bad news... You can't do that in C or any of it's cousins.

The C language does not include range checking. It is up to you as a programmer to avoid situations where an integer overflow...