Hi,
it seems that GPC ignores the upper bounds of $SUBJ when they are automatically converted to CString:
[pas]% cat slice.pas program Foo (Input, Output);
procedure Bar (S: CString); begin {$local X+} WriteLn (S) {$endlocal} end;
var S: String (20);
begin S := 'failedOKfailed'; Bar (S[7 .. 8]) end. [pas]% gpc slice.pas [pas]% ./a.out OKfailed
Emil Jerabek