This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with g++ in gcc version 3.0 20010402
On Apr 5, 2001, David Ronis <ronis@ronispc.chem.mcgill.ca> wrote:
> Alexandre Oliva writes:
>> On Apr 5, 2001, David Ronis <ronis@ronispc.chem.mcgill.ca> wrote:
>>
>> > test.C:3: `cout' undeclared (first use this function)
>>
>> Make it std::cout
> ignoring nonexistent directory "/usr/include/g++-"
> ignoring nonexistent directory "/usr/include/g++-/i686-pc-linux-gnu"
Do you still have the build tree around? What is gcc_gxx_include_dir
set to in gcc/Makefile?
> I added -I/usr/include/g++-v3 and it still doesn't compile.
Make it -isystem /usr/include/g++-v3, and add -isystem
/usr/include/g++-v3/i686-pc-linux-gnu too.
> Moreover, if you're going to require std::cout in every instance of
> cout, you're going to break tons of existing code.
If you include <iostream.h>, you don't need std::. If you include
<iostream>, you do. Older versions of g++ just failed to make this
distinction, but it's been in the C++ Standard from the beginning.
By detecting this error, g++ won't be breaking existing code; the code
was already broken.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me