I'm not sure if this mail went through -- apparently not. Apologies if anyone gets this twice.
Ernst-Ludwig Bohnen wrote:
On Thu, 25 Nov 2004, Adriaan van Os wrote:
......
So, it seems that -Wno-underscore is broken when used with --gnu-pascal.
I can't seem to reproduce it. Did you perhaps try the options the other way around (`-Wno-underscore --gnu-pascal')? Then it would be expected behaviour since options are generally processed from left to right, and `--gnu-pascal', among other things (cf. p/gpc-options.h), sets `-Wunderscore'.
No, I thought of that. I tried various orderings and various compiler builds, all with the same result. Would somebody be so kind to try it on another platform ?
Results on SuSE 9.1 (2.6.5-7.111-default)
[elb1] ~/tmp/pascal $ gpc NoUnderscore.pas NoUnderscore.pas:3: warning: identifiers should not start with an underscore [elb1] ~/tmp/pascal $ gpc NoUnderscore.pas -Wno-underscore [elb1] ~/tmp/pascal $ gpc NoUnderscore.pas --gnu-pascal -Wno-underscore NoUnderscore.pas:3: warning: identifiers should not start with an underscore [elb1] ~/tmp/pascal $ gpc -v Reading specs from /usr/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs Configured with: /tmp/root/install.gpc/gcc-3.3.3/configure --enable-languages=pascal --prefix=/usr/gnu Thread model: posix gpc version 20041017, based on gcc-3.3.3
Ah, I see, it only happens with gcc-3.x (I had tried with 2.x).
Unfortunately, we have to patch gcc.c(!) here, since this is used to dump the `specs' file which gpc will later read and override its built-in settings which were already corrected.
Diff attached (this will go into the diffs/* file, but you can apply it manually just like a GPC diff).
Waldek, this will be an issue with GCC integration as well sometime. (I don't expect serious problems, since it's only about the ordering of arguments, except perhaps "philosophical" ones ...)
Frank