From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118294 invoked by alias); 19 Jul 2015 17:51:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 118268 invoked by uid 48); 19 Jul 2015 17:51:14 -0000 From: "pilot.mm at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/66932] Preprocessor includes wrong header file Date: Sun, 19 Jul 2015 17:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pilot.mm at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg01672.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66932 --- Comment #3 from Michael McWilliam --- (In reply to Jonathan Wakely from comment #2) > Works for me too, with any version. > > gcc_bug$ which gcc > ~/gcc/4.9.3/bin/gcc > gcc_bug$ cd gas > gas$ ./compile.sh > ^[[3~In file included from ./../include/alloca-conf.h:2:0, > from as.h:2, > from as.c:2: > ./config.h:2:2: warning: #warning "You have included the correct include > file" [-Wcpp] > #warning "You have included the correct include file" > ^ > > > Please provide the output of: echo $CPATH $C_INCLUDE_PATH CPATH is empty C_INCLUDE_PATH is: :/usr/local/atlas/include:/usr/local/atlas/include/atlas:/usr/local/atlas/include:/usr/local/atlas/include/atlas So when I remove the leading : in C_INCLUDE_PATH and delete the duplicated entries, magically it works. So clearly there is an error on my machine on the way environment variables are being set... I will have to fix that... I suppose the problem is a NULL path in the variable leads to undefined behaviour... maybe gcc could be improved to ignore null paths or spit a warning or something?