From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10397 invoked by alias); 23 Feb 2003 22:16:01 -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 10358 invoked by uid 71); 23 Feb 2003 22:16:00 -0000 Date: Sun, 23 Feb 2003 22:16:00 -0000 Message-ID: <20030223221600.10357.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Zack Weinberg Subject: Re: c++/7861: Finds executables instead of standard headers? Reply-To: Zack Weinberg X-SW-Source: 2003-02/txt/msg01220.txt.bz2 List-Id: The following reply was made to PR c++/7861; it has been noted by GNATS. From: Zack Weinberg To: Paul Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, paulf.johnson@ukonline.co.uk?Subject Subject: Re: c++/7861: Finds executables instead of standard headers? Date: Sun, 23 Feb 2003 14:06:31 -0800 Paul writes: > g++ test.cpp -o string > Compiles fine. > > Change "Paul" to "Phil" (say), recompile and watch the fireworks! Unable to reproduce this - $ cat > test.cc #include #include using namespace std; int main() { string hi = "Paul"; cout << "Hello " << hi << endl; } $ g++ test.cc -o string ; echo $? 0 $ g++ test.cc -o string ; echo $? 0 I suspect you neglected to mention that you had -I. on your command line, which is specifically asking for fireworks under these conditions. It would be sensible for cpplib to detect '\177ELF' at the beginning of a file and abandon processing it, so as to avoid flooding the user's terminal with unhelpful error messages. (That string cannot appear at the beginning of a well-formed C/C++ source file.) But it would still be an error. zw