This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

strncmp is now completly undeclared



With current CVS mainline (checked out today around 10am UTC) I now
get the following error on i686-linux-gnu:

gromit:/tmp:[1]$ /opt/gcc-3.1-devel/bin/g++ string-test.cc -O2 -save-temps
In file included from /opt/gcc-3.1-devel/include/g++-v3/backward/iostream.h:31,
                 from string-test.cc:1:
/opt/gcc-3.1-devel/include/g++-v3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please use the <X> header instead of <X.h> header for 'C++' includes and use the <cX> header instead of <X.h> header for 'C' includes. To disable this warning use -Wno-deprecated.
string-test.cc: In function `int main()':
string-test.cc:9: `strncmp' undeclared (first use this function)
string-test.cc:9: (Each undeclared identifier is reported only once for each 
   function it appears in.)

The program is simply:

#include <iostream.h>
#include <string.h>

int 
main (void)
{
  char *a, *b;
  
  return strncmp (a, b, 2);
  
}

Removing the inclusion of iostream.h "solves" the problem.

This is a IMO a severe regression from GCC 2.95.

Andreas

P.S. Here's the preprocessed file:

string-test.ii.bz2



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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