No, in this case
it works at compile time, duh. see screenshot.
That is the code that
you provided.
(did not care to test it, did you)
The red line is in Geany that jumps to the compiler error as I pointed out.
In the case of your code it is a
compile time error, but in other scenario's range checks can be runtime errors.
Here that is not the case. Better check your eyes.
More in general, the compiler - almost - always issues a warning or hint and you can promote that warning to error.
That will catch most truncations at compile time.
some of these related to range checks but not all of them are e.g.
{$warn 3036 error}
{$warn 3353 error}
{$warn 4036 error}
{$warn 4048 error}
{$warn 4109 error}
{$warn 4110 error}//your case, the compiler told you so, but a compile time error in{$R+} mode
You can add to these when you encounter them.
Or the crude way: -Sewh
Duh..
I really should write a wiki entry for that, sometime.
(Although I must say there are possible - rare - exceptions to the above where the compiler misses it)