From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18581 invoked by alias); 19 Mar 2002 09:16:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18528 invoked by uid 71); 19 Mar 2002 09:16:03 -0000 Date: Tue, 19 Mar 2002 01:16:00 -0000 Message-ID: <20020319091602.18527.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jorgo Bakker Subject: Re: c++/5997: CPLUS_INCLUDE_PATH not working properly Reply-To: Jorgo Bakker X-SW-Source: 2002-03/txt/msg00698.txt.bz2 List-Id: The following reply was made to PR c++/5997; it has been noted by GNATS. From: Jorgo Bakker To: Neil Booth Cc: Zack Weinberg , gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: c++/5997: CPLUS_INCLUDE_PATH not working properly Date: Tue, 19 Mar 2002 10:06:12 +0100 Neil Booth wrote: > Zack Weinberg wrote:- > > > On Mon, Mar 18, 2002 at 06:25:00PM +0000, Neil Booth wrote: > > > > > > I *think* this goes back 3 years (before my time!) to your change to > > > cppinit.c 1.5 -> 1.6. Would you have a look at it? We used to put > > > the paths in the env var before the default paths. Now we do something > > > that is a little different I think. > > > > I'm not seeing any problem at all... could you please tell me what's > > going wrong in your environment? > > > > ~/f $ CPLUS_INCLUDE_PATH=`pwd`/include g++ -c -H main.cc ; echo $? > > /home/zack/f/include/foo.h > > 0 > > ~/f $ CPLUS_INCLUDE_PATH=`pwd`/include g++-3.0 -c -H main.cc ; echo $? > > . /home/zack/f/include/foo.h > > 0 > > ~/f $ CPLUS_INCLUDE_PATH=`pwd`/include ~/src/gcc/b/vanilla/gcc/g++ \ > > -B ~/src/gcc/b/vanilla/gcc/ -H -c main.cc ; echo $? > > . /home/zack/f/include/foo.h > > 0 > > You're quite right - I'd not tested the PR, assuming it must be right. > I just looked for when the last time this area of code was changed. I > can't reproduce it either. jbakker, can you elaborate on what problem > you're seeing? > > Neil. Hmm, I started to doubt myself, and indeed: on Linux it works fine. However, my sun-sparc-solaris2.[6-8] platforms all give the following output. It seems as if CPLUS_INCLUDE_PATH is interpreted as a PATH to C-include files only; hence the error. Jorgo --- $ CPLUS_INCLUDE_PATH=`pwd`/include /usr/local/devel/gcc-3.0.4/bin/g++ -v -c -H main.cc Reading specs from /usr/local/devel/gcc-3.0.4/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs Configured with: ../gcc-3.0.4-src/configure --prefix=/usr/local/devel/gcc-3.0.4 --with-gnu-as --with-gnu-ld --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld --enable-shared=libstdc++ --disable-threads Thread model: single gcc version 3.0.4 /usr/local/devel/gcc-3.0.4/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -H -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc main.cc -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase main.cc -version -o /data/Users/jbakker/tmp/ccpp6A4E.s GNU CPP version 3.0.4 (cpplib) (sparc) GNU C++ version 3.0.4 (sparc-sun-solaris2.8) compiled by GNU C version 3.0.4. ignoring nonexistent directory "/usr/local/devel/gcc-3.0.4/sparc-sun-solaris2.8/include" #include "..." search starts here: #include <...> search starts here: /data/Users/jbakker/tmp/gcc-bug/foo/tmp/include /usr/local/devel/gcc-3.0.4/include/g++-v3 /usr/local/devel/gcc-3.0.4/include/g++-v3/sparc-sun-solaris2.8 /usr/local/devel/gcc-3.0.4/include/g++-v3/backward /usr/local/include /usr/local/devel/gcc-3.0.4/include /usr/local/devel/gcc-3.0.4/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/include /usr/include End of search list. . /data/Users/jbakker/tmp/gcc-bug/foo/tmp/include/foo.h In file included from main.cc:1: /data/Users/jbakker/tmp/gcc-bug/foo/tmp/include/foo.h:5: declaration of C function `void handle(float)' conflicts with /data/Users/jbakker/tmp/gcc-bug/foo/tmp/include/foo.h:4: previous declaration `void handle(int)' here