> Question 1:
> Will such code result in memory corruption somewhere in both the
> cases where runtime range checking is enabled and the one where
> it is not enabled?
No memory corruption. The length of the array is passed to the helper routine
>
> Question 2:
> Is this something that needs to b
Apparently, activating -Cr is needed to enable enforcement of
compile time constant range checking as well.
The ff. program:
program blah;
var
E: array[2..4] of Integer;
begin
E[10]:=15;
end.
will compile albeit with a warning. Only when -Cr is enabled
will the range violation become an error