This is the mail archive of the
mailing list for the GCC project.
Is this correct? (contradicting includes)
- To: gcc at gcc dot gnu dot org
- Subject: Is this correct? (contradicting includes)
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Thu, 23 Aug 2001 12:52:20 +0200
- Reply-To: martin dot kahlert at infineon dot com
I was hit by this:
$ cat Old/i1.h
$ cat Old/i2.h
#define A OLD
$ cat New/i2.h
#define A NEW
$ cat t.c
(There is *no* New/i1.h file)
$ gcc -E -I New -I Old t.c
# 1 "t.c"
# 1 "Old/i1.h" 1
# 1 "Old/i2.h" 1
# 2 "Old/i1.h" 2
# 2 "t.c" 2
# 1 "New/i2.h" 1
# 5 "t.c" 2
We use cvs for our project. If we do not check out everything, the missing
peaces are found inside a completely checked out up to date dir (which is Old
in this example). So if we check out header file i2.h *only*,
it is not used at all.
How is it meant to work? Is there a general rule, how cpp finds its headers?
The early bird catches the worm. If you want something else for
breakfast, get up later.