This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cpp behavior problem
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Sean McNeil <sean at mcneil dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Oct 2002 06:51:52 +0100
- Subject: Re: cpp behavior problem
- References: <1035511958.44438.10.camel@blue.mcneil.com>
Sean McNeil wrote:-
> Hi folks,
>
> I'm having trouble with the cpp. Basically, it appears to be
> inconsistent in how it picks up included files.
>
> If a routine includes a file with <>, then it will pick up my file from
> the directory in a -I command argument. This file includes another file
> with "". That file will only be picked up within the current include
> path or farther down. This is not really documented anywhere. The docs
> say any include using <> can be controlled with the -I- option. I don't
> use this option, though. I've got additional problems when I do (-I.
> ..... -I- -I. .... won't allow for the current directory searched when
> <> is used).
<> is supposed to be for system headers. System headers can only
include other system headers, and so should be using <> too.
However, I don't see anything in the code that should be enforcing this.
Further, <> never searches the current directory. "." is the compiler's
directory, not the current file's directory.
Neil.