This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
strstream.h (deprecated) is broken
- From: "Michael Veksler" <VEKSLER at il dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 31 May 2002 08:08:00 +0300
- Subject: strstream.h (deprecated) is broken
- Sensitivity:
I get a segmentation fault when using strstream (yes I know it is
deprecated, but I need to support older compilers for my customers...)
$ g++ -v
Reading specs from
/home2/veksler/gnu2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc/configure --prefix=/home2/veksler/gnu2
--enable-languages=c++
Thread model: single
gcc version 3.2 20020530 (experimental)
$ g++ -Wno-deprecated t.cpp
$ ./a.out
Segmentation fault (core dumped)
$ cat t.cpp
#include <strstream.h>
#include <iostream>
int main()
{
strstream s;
for (unsigned i=0 ; i!= 8 ; ++i)
s << i << std::endl;
s << std::ends;
return 0;
}