Bug 27137 - Without -I- gcc needs another way to defer source dir. search
Summary: Without -I- gcc needs another way to defer source dir. search
Status: RESOLVED DUPLICATE of bug 19541
Alias: None
Product: gcc
Classification: Unclassified
Component: preprocessor (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-12 19:10 UTC by Tom Truscott
Modified: 2006-04-13 16:45 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Truscott 2006-04-12 19:10:48 UTC
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
Comment 1 Andrew Pinski 2006-04-12 20:18:30 UTC
What do you need exactly that -iquote or any of the -i* options provide?
Or even what this patch should provide:
http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01197.html

That adds an option to do what exactly -I- did except for not change the behavior of -I* after -I-.
Comment 2 Andrew Pinski 2006-04-12 20:19:45 UTC
If that patch does the trick for you, then this is a dup of bug 19541.
Comment 3 Tom Truscott 2006-04-13 14:05:47 UTC
The patch for bug 19541 should resolve this, thanks!
Comment 4 Andrew Pinski 2006-04-13 16:45:18 UTC

*** This bug has been marked as a duplicate of 19541 ***