Article View: gnu.gcc.help
Article #41598another gcc option question, this time about -I-
From: Edward Hartnett
Date: Tue, 27 Feb 1996 00:00
Date: Tue, 27 Feb 1996 00:00
36 lines
1958 bytes
1958 bytes
Reading the gcc info pages I find:
`-I-'
Any directories you specify with `-I' options before the `-I-'
option are searched only for the case of `#include "FILE"'; they
are not searched for `#include <FILE>'.
If additional directories are specified with `-I' options after
the `-I-', these directories are searched for all `#include'
directives. (Ordinarily *all* `-I' directories are used this way.)
In addition, the `-I-' option inhibits the use of the current
directory (where the current input file came from) as the first
search directory for `#include "FILE"'. There is no way to
override this effect of `-I-'. With `-I.' you can specify
searching the directory which was current when the compiler was
invoked. That is not exactly the same as what the preprocessor
does by default, but it is often satisfactory.
`-I-' does not inhibit the use of the standard system directories
for header files. Thus, `-I-' and `-nostdinc' are independent.
I think I understand what this option does, but I don't quite
understand why one would want to do this. Is it just to save the
compiler's search time? Or is there some deeper meaning?
Thanks!
--
Edward Hartnett ejh@larry.gsfc.nasa.gov
* I don't speak for NASA or ARC, I just work for them! *
Goddard Distributed Active Archive Center (DAAC)
Check out cool Earth Science data at: http://daac.gsfc.nasa.gov/
Technical Details
Message-ID:
<EJH.96Feb27112424@larry.gsfc.nasa.gov>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,eedd9c1c19d41318,start X-Google-Attributes: gid11318c,public From: ejh@larry.gsfc.nasa.gov (Edward Hartnett) Subject: another gcc option question, this time about -I- Date: 1996/02/27 Message-ID: <EJH.96Feb27112424@larry.gsfc.nasa.gov> X-Deja-AN: 141325842 organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA followup-to: gnu.gcc.help newsgroups: gnu.gcc.help