|
|
|
|
|
by TillE
602 days ago
|
|
Basically the behavior is hardware-dependent, and nobody wants to mandate that C++ compilers generate a ton of extra instructions on hardware which does not behave a particular way. Of course you can define your own checked integer types, using inline assembly to check the overflow flag where available. |
|
Any architecture that doesn't use 2s complement is so esoteric by now that it does not make any sense for a general-purpose C compiler to pretend they exist.