changes in -Wall
Dimitri PAPADOPOULOS-ORFANOS
papadopo@shfj.cea.fr
Mon Sep 7 08:23:00 GMT 1998
Here is an excerpt of the documentation of the GNU C compiler:
`-Wunknown-pragmas'
Warn when a #pragma directive is encountered which is not
understood by GCC. If this command line option is used, warnings
will even be issued for unknown pragmas in system header files.
This is not the case if the warnings were only enabled by the
`-Wall' command line option.
`-Wall'
All of the above `-W' options combined. This enables all the
warnings about constructions that some users consider
questionable, and that are easy to avoid (or modify to prevent the
warning), even in conjunction with macros.
Using egcs-1.1b on Solaris 2.5.1, I compile a C++ file using the
following options:
-ansi
-O3
-fPIC
-Wall
I keep getting warnings in system headers:
* The first one seems in contradiction with the documentation:
/usr/openwin/include/GL/gl.h:1: warning: ignoring pragma: ignored
* The second one is not in contradiction with the documentation.
However, using -Wall, I used not to get this warning - up to
egcs-1.0.3a. It is of course very annoying, as X11 headers are full
of such function declarations. How to shut up this warning and keep
the -Wall option in the same time?
/usr/openwin/include/X11/Xutil.h:867: warning: return-type of `XXorRegion' defaults to `int'
Is this a bug? What should I do to correct it?
Thank you,
--
Dimitri Papadopoulos
More information about the Gcc-bugs
mailing list