www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000227

When Created: 06/19/1998 13:55:26
Against DJGPP version: 2.01
By whom: keviny@hk.super.net
Abstract: #include sequence matters
I have this trivial program:

#include <iostream>
#include <string>

int main(void)
{
   const string s = "Hello, world!";

   std::cout << s << endl;

   return 0;
}

It compiles okay. However, if I #include <string> first and <iostream> second,
I get the following error from gcc:

In file included from c:/djgpp/lang/cxx/stl_alloc.h:57,
                 from c:/djgpp/lang/cxx/alloc.h:21,
                 from c:/djgpp/lang/cxx/std/bastring.h:39,
                 from c:/djgpp/lang/cxx/string:6,
                 from hello.cpp:1:
c:/djgpp/include/stdlib.h:16: warning: `NULL' redefined
c:/djgpp/lang/cxx/libio.h:88: warning: this is the location of the previous defi
nition

What is wrong? Am I alone or can someone else reproduce the result? I'm
running DJGPP 2.01 on NT 4.0 SP3.

Thanks.

Note added: 04/13/1999 06:00:44
By whom: eliz@is.elta.co.il
This a known problem in the C++ headers that come with GNU C++
libraries.  But it's not a DJGPP bug, it should be reported to
the GNU C++ library maintainers.

Closed on 04/13/1999 06:00:23: A bug in C++ library distribution; not a DJGPP bug.
By whom: eliz@is.elta.co.il



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010