-isystem vs. #pragma system_header

Nathan Myers ncm@cantrip.org
Wed May 17 22:57:00 GMT 2000


On Wed, May 17, 2000 at 08:13:26PM -0700, Zack Weinberg wrote:
> On Wed, May 17, 2000 at 06:48:40PM -0700, Nathan Myers wrote:
> > I am concerned that with the new pragma it may become harder to control
> > warning behavior on header files.  E.g., users don't ever want warnings 
> > about system headers, but when we are developing we do want warnings.  
> > Ideally, the headers would not have anything in them to warn about,
> > but we have to sub-include vendor headers we have no control over.
> > 
> > This can be solved ...
> > by adding (yet) another "-W" option to control how the compiler emits
> > warnings for system headers.
> 
> I could trivially add a -fno-system-headers or something like that
> that shut off all special treatment for system headers.  Anything more
> complex than that is going to need careful discussion.

Maybe it should be -Wsystem-headers, instead: issue warnings about 
constructs even in system headers.  I have an idea that knowing it's 
a system header will be interesting for other reasons, so you won't 
want to turn it off just to be able to see warnings.

Nathan Myers
ncm at cantrip dot org



More information about the Libstdc++ mailing list