libstdc++ headers and system headers
Fri Feb 16 10:52:00 GMT 2001
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!).
More information about the Libstdc++