This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/7861: Finds executables instead of standard headers?


The following reply was made to PR c++/7861; it has been noted by GNATS.

From: Zack Weinberg <zack at codesourcery dot com>
To: Paul <paulf dot johnson at ukonline dot co dot uk>
Cc: gcc-gnats at gcc dot gnu dot org,  gcc-bugs at gcc dot gnu dot org,  nobody at gcc dot gnu dot org,
	  gcc-prs at gcc dot gnu dot org,  paulf dot johnson at ukonline dot co dot uk?Subject
Subject: Re: c++/7861: Finds executables instead of standard headers?
Date: Sun, 23 Feb 2003 14:06:31 -0800

 Paul <paulf dot johnson at ukonline dot co dot uk> 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 <string>
 #include <iostream>
 
 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]