This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ headers and system headers
- To: aoliva at redhat dot com (Alexandre Oliva)
- Subject: Re: libstdc++ headers and system headers
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Fri, 16 Feb 2001 10:49:50 -0800 (PST)
- Cc: bkoz at redhat dot com (Benjamin Kosnik), neil at daikokuya dot demon dot co dot uk (Neil Booth), gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, jason at redhat dot com (Jason Merrill)
Alexandre Oliva writes:
> In fact, IMO, it's *wrong* to add system header directories with -I.
> You should use -isystem for those.
This statement will be seen as strange by anyone who must use more than
one compiler. -isystem is gcc-specific, while -I is mostly portable.
In any case, I fear that it is common, as what is a system header on
OS 1 may be a user header on OS 2 (say, for a common facility like Tcl),
so a make with -I$(WHERE) may sometimes be run with WHERE=/usr/include.
Now, if the only effect of using -I for system headers is, say, you don't
get the pragma that disables warnings, that's probably OK. But if more
severe breakage occurs, it will probably be seen as a bug (sorry Robert,
I used that word again!).