On Tuesday, 16 July 2013 at 11:14:44 UTC, bearophile wrote:
eles:

Bye,
bearophile

Don C.: "There's a root cause issue -- integer overflow is not an
error in general. The paper which bearophile keeps posting, which
he has apparently never read, shows quite convincingly that you
cannot make it an error in a C-family language. There are just
too many legitimate uses of integer wraparound.

eg. int.max + 200 - 300 should not be an error."

Frankly, I keep thinking if FreePascal didn't nail it the good
way: consider all integral values as belonging to the widest
integral type, perform calculation (as if) in that type, then
truncate (if needed) only the final result, on assignment.

Reply via email to