chapel-lang/chapel — pull request #1070 by vasslitvinov (2014-12-23 05:12:47+00:00)
Title: Improved a couple of error messages and checks for range overflows.

* Extended this error message:
the step argument of the 'by' operator is too large
with
"and cannot be represented within the range's stride type int(xx)"

* While there, improved the corresponding check:
- perform it only when the stride arg's type is unsigned
(otherwise the stride arg is of the same type as the range's stride,
and it will always fit)
only if boundsChecking is on
- perform 1 run-time check instead of 2
- I added a compilerAssert just for clarity

* Changed this error message:
Overflow detected for iteration over a bounded range.
==>
Iteration over a bounded range may be incorrect due to overflow.

* Added a paragraph to the spec under "craychapel"
to explain when such an error happens.

* Adjusted .good files correspondingly.