Marc van Woerkom wrote:
What Warnings are supposed to work right now? I have the impression that -Wall, -pedantic do have not much effect.
Huh? When I am trying to compile anything beyond "Hello, world" with `-pedantic', I get big piles of warnings. Maybe your programming style is just ultra-safe?
`-pedantic' gives warnings about every possible incompatibility with any Pascal compiler we know about, leaving not much room for programming.
`-Wall' is simply inherited from GCC and does suggestions about `begin ... end' blocks etc. IMHO, this is not very important in Pascal.
E.g. detecting uninitialized variables seems to be a problem (did not work too when using -O, -O2..)
This is indeed only detected when the compiler is tracking each variable carefully enough - which is the case only with optimization. BTW, global variables are never considered uninitialized because they are initialized to zero (or Nil or false or empty string or ...) at the beginning of the program. This is (a) inherited from GCC and (b) for compatibility to Borland Pascal. An option to turn this off would be useful but too much work for now.
Hope this helps somehow ...
Peter