cpp behavior problem

Sean McNeil sean@mcneil.com
Thu Oct 24 19:25:00 GMT 2002


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

I've attached a small test case.  It shows the behavior that isn't
explained well enough when compiled as

gcc -Iinc1 -Iinc2 -c test_inc.c

Cheers,
Sean


-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_inc.tar.gz
Type: application/x-gzip
Size: 384 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20021024/8e0af95e/attachment.bin>


More information about the Gcc-bugs mailing list