* bug in -iwithprefix?
@ 2007-12-11 3:51 Hiroki Kaminaga
0 siblings, 0 replies; only message in thread
From: Hiroki Kaminaga @ 2007-12-11 3:51 UTC (permalink / raw)
To: gcc-help; +Cc: kaminaga
Hi,
I'm assuming -iprefix + -iwithprefix would locate DIR to same place as
if specified by -idirafter, from below info gcc:
`-iwithprefix DIR'
`-iwithprefixbefore DIR'
Append DIR to the prefix specified previously with `-iprefix', and
add the resulting directory to the include search path.
`-iwithprefixbefore' puts it in the same place `-I' would;
`-iwithprefix' puts it where `-idirafter' would.
However, it didn't with gcc-4.1.2 (FC7):
(it was same with FC3, gcc-3.4.2)
$ cat test.c
/* this should be included by system directory's include/err.h */
#include <err.h>
$ cat ./include/err.h
#error "Choke me"
$ gcc -iprefix ./ -iwithprefix include/ -c test.c
In file included from test.c:2:
./include/err.h:1:2: error: #error "Choke me"
$ gcc -idirafter ./include/ -c test.c
$
With -idirafter -v, include search path was:
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.2/include
/usr/include
./include/
End of search list.
Whereas -iwitprefix -v, include search path was:
#include "..." search starts here:
#include <...> search starts here:
./include/
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.2/include
/usr/include
So, as opposed to the gcc info, -iwithprefix does not seem to put DIR
where -idirafter would.
Thanks in advance.
Best Regards,
(Hiroki Kaminaga)
t
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-11 3:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-11 3:51 bug in -iwithprefix? Hiroki Kaminaga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).