The utility of standard's semantics for overflow
Robert Dewar
dewar@adacore.com
Wed Jun 29 12:14:00 GMT 2005
Theodore Papadopoulo wrote:
> So unless you do arithmetics or combinatorics, most of the uses of
> "wide" (ie > 32b) integral types semantically (ie in the programmer's
> mind) assume that overflow does not happen in practise in the program.
I think that's probably right. And in the context of this discussion,
what does happen to most programs if an int used with this assumption
overflows? Answer, it's probably a bug, and it is unlikely that
silent wrapping will correspond to correct behavior.
More information about the Gcc
mailing list