Desire gcc option to skip warnings in standard headers
Joseph H. Buehler
jhpb@sarto.gaithersburg.md.us
Sat Jul 4 12:40:00 GMT 1998
> It would be very convenient for me to have a gcc command-line option
> or #pragma to prevent the printing of warnings in the standard
> headers. Warnings could begin to be issued at the first line that is
> not #include <something.h>. It seems to me that this would be
> relatively easy to implement.
If this gets implemented in gcc, I suggest a better way to define
"system header" than "presence of #include<> syntax".
Where I work, we *never* use
#include "whatever.h"
because developers compile their files against a shared nightly build
area. Consider having a .c file in the shared area and a .h file
being edited in your private work area. Some vendors' compilers, when
compiling the .c file, will *always* look for the .h in the directory
containing the .c file: there is no way to override this.
So we always use the <> syntax so we have complete control over the
include file path.
Joe Buehler
More information about the Gcc
mailing list