This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Desire gcc option to skip warnings in standard headers


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]