Mirsad Todorovac wrote:
BTW, some tests do "too much", but I'll leave it at that now. (Hope they'll always catch the right error.)
Well, so do I: but some things I've inherited some of it.
I hope you don't mean TGrayScale enumerated type, because I'm sort of fond of it. (-;
No, I don't mean that. Sometimes do you an additional assignment after the critical statment and in a few cases you do a loop where a single statement at the critical step would suffice.
Well, I was somewhat puzzled if the statement that isn't used by anything might be optimized out at -O3, I guess.
At least with range-checks on, it won't because the backend sees the range-checking code as something with cannot be optimized away (in particular in the case where the check fails -- it might be able to remove a few compile-time-known non-failing checks, though).
- Type initializers
I think that's touched in mir046*.pas
Almost. Move the `Value parm' to the type declaration.
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. The options/directives will be global, so we don't have to test every combination.)
Frank