changes in -Wall
Jeffrey A Law
law@cygnus.com
Wed Sep 9 13:25:00 GMT 1998
In message < 199809071523.RAA05630@orcanie.shfj.cea.fr >you write:
> 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
I'd bet /usr/openwin isn't considered a system header by the compiler.
Generally system headers are those which live under /usr/include.
> * 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 `XXorRegi
> on' defaults to `int'
>
> Is this a bug? What should I do to correct it?
This is a bug in the X11 header files, not egcs.
jeff
More information about the Gcc-bugs
mailing list