|
![](/i/fill.gif) |
> - a (seemingly) buggy behavior of the compiler used -- here gcc,
> possibly affecting all versions.
Okay, that is actually _not_ a GCC bug (but a documented feature)
to treat the *_INCLUDE_PATH paths as system paths. According to the gcc
info file/man page:
`CPATH'
`C_INCLUDE_PATH'
`CPLUS_INCLUDE_PATH'
`OBJC_INCLUDE_PATH'
<snip>
`CPATH' specifies a list of directories to be searched as if
specified with `-I', but after any paths given with `-I' options
on the command line. This environment variable is used regardless
of which language is being preprocessed.
The remaining environment variables apply only when preprocessing
the particular language indicated. Each specifies a list of
directories to be searched as if specified with `-isystem', but
after any paths given with `-isystem' options on the command line.
<snip>
and:
`-isystem DIR'
Search DIR for header files, after all directories specified by
`-I' but before the standard system directories. Mark it as a
system directory, so that it gets the same special treatment as is
applied to the standard system directories.
So, setting e.g. CPLUS_INCLUDE_PATH with a "." is surely a
mistake that should be avoided at all costs.
- NC
Post a reply to this message
|
![](/i/fill.gif) |