Hi, List! Could please someone clarify the situation with range-checking in GPC. I've downloaded and installed the latest version available at the moment (gpc version 20041218, based on gcc-3.3.4, RedHat 9, kernel 2.6.7). Test suite of the same version has been successfully passed (all tests ok, one skipped). It is written in the documentation that "--range-checking" option is already available. It's really available but it seems to me that it doesn't work or I've misunderstood something. Anyway, the test program below doesn't work - it hangs (actually, it runs in infinite loop since an assignment in the body of the loop overwrites the value of i by zero at every pass) instead of catch run-time error as it should be. Am I doing something wrong? I've built the program using "gpc --range-checking test.pas".
program test; {$R+} var a: array [0..1] of byte; i: byte; begin writeln ('test started'); for i := 0 to 2 do begin a [i] := 0; end; writeln ('test passed'); end.
Best regards, Igor Marnat mailto:marny@rambler.ru