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


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

Re: libstdc++ headers and system headers


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!).




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