From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23532 invoked by alias); 6 May 2011 10:59:38 -0000 Received: (qmail 23522 invoked by uid 22791); 6 May 2011 10:59:37 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 May 2011 10:59:24 +0000 From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/48910] Current working directory in system include search path X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 06 May 2011 10:59:00 -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 X-SW-Source: 2011-05/txt/msg00551.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48910 --- Comment #1 from joseph at codesourcery dot com 2011-05-06 10:59:15 UTC --- On Fri, 6 May 2011, Adam_5Wu at Hotmail dot com wrote: > The workaround is to stop inserting "." in the system include search path > chain. > > In file gcc-4.6.0/gcc/incpath.c, replace > path = xstrdup ("."); > with > continue; But that code is processing an environment variable, and it's absolutely standard that empty elements in PATH-like environment variables are processed as ".". What environment variable is set to contain an empty element, and how did it get set like that? The problem is that the environment variable is set, and the fix must be to stop it from being set. If the variable was not set by something in GCC, then this is not a GCC bug but a problem with your build environment.