I found a problem with IO checks, if a project is compiled using packages, that have been compiled with other settings.
I wonder, if this would be considered a bug:

If some packages are compiled with and some without IO checking. An IO error happens in a package that is compiled without IO checking, as expected no error is risen here. But the error is stored, and an unrelated statement which has IO checks will fail later.

The following demo project enables and disables IO checks to simulate the situation.

program Project1;
{$mode objfpc}{$H+}
begin
  {$I+}
  writeln('1');
  {$I-}
  chdir('c:\IDoNotExist');
  {$I+}
  writeln('2');  // error for chdir is risen here
  readln;
end.

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to