3 ms·
Not really. Every processor has an Overflow Flag [1] that can be used to check for overflows in arithmetic operations. Most programming languages don't have a
by mFixman 5y ago
Not really. Every processor has an Overflow Flag [1] that can be used to check for overflows in arithmetic operations.
Most programming languages don't have a way to explicitly action on contents of that flag since it would complicate optimisations and program flow, but it's still a pity that this caused so many bugs.
[1] https://en.wikipedia.org/wiki/Overflow_flag https://en.wikipedia.org/wiki/Overflow_flag