[G4:~/testgpcadriaan] adriaan% cat NoUnderscore.p
program NoUnderscore;
procedure _Run; begin writeln('_Run') end;
begin _Run end.
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p NoUnderscore.p:4: warning: identifiers should not start with an underscore
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p -Wno-underscore
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p --gnu-pascal -Wno-underscore NoUnderscore.p:4: warning: identifiers should not start with an underscore
So, it seems that -Wno-underscore is broken when used with --gnu-pascal.
Regards,
Adriaan van Os
Adriaan van Os wrote:
[G4:~/testgpcadriaan] adriaan% cat NoUnderscore.p
program NoUnderscore;
procedure _Run; begin writeln('_Run') end;
begin _Run end.
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p NoUnderscore.p:4: warning: identifiers should not start with an underscore
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p -Wno-underscore
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p --gnu-pascal -Wno-underscore NoUnderscore.p:4: warning: identifiers should not start with an underscore
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'.
Frank
Frank Heckenbach wrote:
Adriaan van Os wrote:
[G4:~/testgpcadriaan] adriaan% cat NoUnderscore.p
program NoUnderscore;
procedure _Run; begin writeln('_Run') end;
begin _Run end.
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p NoUnderscore.p:4: warning: identifiers should not start with an underscore
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p -Wno-underscore
[G4:~/testgpcadriaan] adriaan% gpc NoUnderscore.p --gnu-pascal -Wno-underscore NoUnderscore.p:4: warning: identifiers should not start with an underscore
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 ?
Regards,
Adriaan van Os
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
The same results with: ---------------------- [elb3] ~/tmp/pascal $ gpc -v Reading specs from /usr/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Configured with: /tmp/root/install.gpc/gcc-3.2.3/configure --enable-languages=pascal --prefix=/usr/gnu Thread model: posix gpc version 20040516, based on gcc-3.2.3
Ernst-Ludwig
On Thu, 25 Nov 2004, 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
The same results with:
[elb3] ~/tmp/pascal $ gpc -v Reading specs from /usr/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Configured with: /tmp/root/install.gpc/gcc-3.2.3/configure --enable-languages=pascal --prefix=/usr/gnu Thread model: posix gpc version 20040516, based on gcc-3.2.3
gpc --gnu-pascal -Wno-underscore -o noun nounderscore.pas nounderscore.pas:3: warning: identifiers should not start with an underscore
gpc -Wno-underscore -o noun nounderscor.pas
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs Configured with: ../gcc-3.3.5/configure --enable-languages=c,c++,pascal : (reconfigured) ../gcc-3.3.5/configure --enable-languages=c,c++,pascal Thread model: posix gpc version 20041017, based on gcc-3.3.5
Russ
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
Frank Heckenbach wrote:
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).
Solved. Thanks for the patch.
Regards,
Adriaan van Os