The -I option inhibits the use of the current file directory as the first
search directory for #include "file". This is important for software
development which uses partially populated source trees for which the build
"looks through" other trees to find the missing pieces.

Without -I- gcc should offer something like the IBM xlc -qidirfirst option:

                Specifies the search order for files included with
                the '#include' <file_name> directive.  Use
                -qidirfirst with the -I option.  If -qidirfirst is
                specified, the directories specified by the
                -I<directory> option are searched before the
                directory where the current file resides.  The
                default is -qnoidirfirst.

This is all we need, but over the last 10 years we have instead pushed vendors
to support the -I- option.  It is sadly ironic that gcc deprecates it.

My employer does not use `nmake', but `nmake' has noticed this too:

   http://www.bell-labs.com/project/nmake/newsletters/issue021.html


-- 
           Summary: Without -I- gcc needs another way to defer source dir.
                    search
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: trt at acm dot org
  GCC host triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27137

Reply via email to