Adriaan van Os wrote:
Frank Heckenbach wrote:
Also we need some tests for the command-line options `--[no-]range-checking' (default on) and the compiler directives `{$[no-]range-checking}', and `{$R+}', `{$R-}'. (Only one case of range-failure suffices.
GCC also defines --bounds-check, the gcc-3.3 docs read:
" -fbounds-check For front-ends that support it, generate additional code to check that indices used to access arrays are within the declared range. This is currently only supported by the Java and Fortran 77 front-ends, where this option defaults to true and false respectively.
That's too specific. (And I'm not convinced we should implement a compatibility option that checks only array bounds.)
-ftrapv This option generates traps for signed overflow on addition, subtraction, multiplication operations."
That's a wholly different story (and probably also too specific if it only applies to "signed" overflow -- whatever this is supposed to mean -- and to those 3 operations and misses, e.g. shifts).
The options/directives will be global, so we don't have to test every combination.)
This implies that $R+/$R- can not be used to set range checking off locally, e.g. for a block or a procedure ?
Yes, they can. I meant global WRT the different situations of range checks, not to the part of source code they apply to.
Frank