This is the mail archive of the 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: [patch] New flag -Wsystem-headers

 > From: Branko =?iso-8859-2?Q?=C8ibej?= <>
 >     (3) other -- removes superfluous tests system headers from warning
 >         checks in C, C++ and Fortran front-ends, so that -Wsystem-headers
 >         will enable those warnings, too.
 > (1) and (2) are independent; (3) depends on (2), but can be omitted.
 > 2000-09-15  Branko Cibej  <>
 > 	* c-common.c, c-decl.c, c-lex.c,, c-typeck.c:
 > 	Don't test in_system_header when checking warning conditions.
 > 	* cp/decl.c, cp/decl2.c, cp/parse.y: Likewise.
 > 	* f/lex.c (fflex_hash_): Make test of warn_unknown_pragmas
 > 	consistent with the test in c-lex.c:cb_def_pragma and
 > 	c-pragma.c:dispatch_pragma.

Sorry I came in late on this one.  I'm not sure I agree with this last
part.  Certain warnings like -Wtraditional are meant as portability
aids.  Its not expected that c89 system headers would necessarily pass
these tests or be expected to.  I don't see what benefit it is to the
user to start showing them.

Likewise for -pedantic, we removed a lot of fixincludes stuff under
the assumption that we wouldn't ever issue certain of the these
warnings in system headers.  Now they'll start unnecessarily

I think you may want to reconsider part 3, or at least provide levels
e.g. -Wsystem-headers={0,1,2} as a "verbosity" flag and some of these
would only show if warn_system_headers >= 2.

Kaveh R. Ghazi			Engagement Manager / Project Services		Qwest Internet Solutions

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