Give ranges explicit types.

In new clang, these are treated as enums, not integers, and as such
can't be incremented.
Avoid narrowing warnings.

Under new clang, we can't pass doubles inside curly braces because curly
braces say that narrowing can't happen.  Explicitly cast to int.
Merge branch 'compilation' into develop