This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -isystem vs. #pragma system_header
- To: gcc at gcc dot gnu dot org
- Subject: Re: -isystem vs. #pragma system_header
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Wed, 17 May 2000 20:13:26 -0700
- Cc: libstdc++ at sourceware dot cygnus dot com
- References: <20000517184840.A18015@store.zembu.com>
On Wed, May 17, 2000 at 06:48:40PM -0700, Nathan Myers wrote:
> (Cross-posted to libstdc++ list; please reply on the gcc list.)
>
> In connexion with the new #pragma system_header...
> When last I checked (two years back), "-isystem" in C++ was
> undocumented and severely broken in C++, doing what no sane
> person could conceive of wanting. If it hasn't been replaced
> with something sane, maybe it would be best to get rid of it now.
I'm not able to divine from what you wrote, specifically what
semantics of -isystem you object to. If it's just the implicit extern
"C", then I believe that is no longer done.
...
> 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 using something like the above suggested feature, or
> 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.
zw