This is to request reinstatement of the -I- command line directory search option. Sorry for the late request, we only recently became aware that -I- is deprecated in gcc 4.0.
The Lucent(R) nmake tool (http://www.bell-labs.com/project/nmake/) relies on -I- to implement the Lucent(R) nmake viewpathing feature which allows developers to have copies of only the code they are modifying in their private build area while picking up the rest of the code from shared, common base areas. Lucent(R) nmake viewpathing requires the ability to override searching the directory of the including file for #include "..." style includes. The example below shows a development node "dev" viewpathed through an official node "off". The developer has a modified version of a.h which is included from a.c in the official node. There is also an official version of a.h in off. When compiling a.c from the dev directory, the developer needs to pick up the official version of a.c and the development version of a.h. It is not clear how to use the suggested replacement option -iquote to achieve the needed effect. See http://www.bell-labs.com/project/nmake/impact/viewpath.html and http://www.bell-labs.com/project/nmake/tutorial/s10.html for more on Lucent(R) nmake viewpathing. See the 2 pages linked from http://www.bell-labs.com/project/nmake/manual/cpp.html for an explanation of the Lucent(R) nmake cpp -I- feature. We also read in a mailing list archive some concern that suppressing the directory containing the current file tends to break system headers (see http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00154.html.) We believe that a companion feature, "prefixinclude", may address this concern by extending -I- to reasonably handle the case of include paths with a directory prefix. See http://www.bell-labs.com/project/nmake/manual/cppfeatures.html for a description of prefixinclude. gcc historically implemented -I- but not prefixinclude, so while useful it gets us only part of the way there. prefixinclude support may eliminate problems encountered with -I-. At some point we would also like to see prefixinclude support in gcc. Other data points related to this request: - -I- with prefixinclude has a proven, long history of use in large Lucent(R) nmake-based projects. - HP aC++ and ANSI C implement -I- and prefixinclude http://docs.hp.com/en/5187-0137/5187-0137.html - Sun Studio 10 implements -I- http://docs.sun.com/source/819-0494/sun.specific.html#60446 Let us know what you think or if you have any additional questions. We would very much like to see -I- supported again in gcc. Thanks. nmake Development Gary Selzer Rich Brack ____________________ $ uname -a Linux phoebe 2.6.12-1-686 #1 Tue Aug 9 13:00:08 UTC 2005 i686 GNU/Linux $ cat /etc/debian_version testing/unstable $ type gcc-4.0 gcc-4.0 is /usr/bin/gcc-4.0 $ gcc-4.0 -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --enable-nls --without-included-gettext --enable-threads=posix --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.0.2 20050806 (prerelease) (Debian 4.0.1-4) $ pwd /home/gms/ms/050049 $ ls -lR .: total 16 drwxr-xr-x 2 gms gms 4096 2005-08-23 10:23 dev -rwxr-xr-x 1 gms gms 249 2005-08-22 17:26 mk drwxr-xr-x 2 gms gms 4096 2005-08-22 17:30 off ./dev: total 0 -rw-r--r-- 1 gms gms 27 2005-08-22 16:28 a.h ./off: total 4 -rw-r--r-- 1 gms gms 88 2005-08-22 17:07 a.c -rw-r--r-- 1 gms gms 24 2005-08-22 16:27 a.h $ cat off/a.c #include <stdio.h> #include "a.h" int main() { printf("sval: %s version\n", sval); } $ cat off/a.h #define sval "official" $ cat dev/a.h #define sval "development" $ cd dev $ gcc-4.0 -o a -iquote . ../off/a.c $ ./a sval: official version $ gcc-4.0 -o a -I. -I- ../off/a.c cc1: note: obsolete option -I- used, please use -iquote instead $ ./a sval: development version