new libstdc++ bug - urgent
jarausch@igpm.rwth-aachen.de
jarausch@igpm.rwth-aachen.de
Tue Nov 21 09:35:00 GMT 2000
Hi,
using
Reading specs from /usr/LOCAL/lib/gcc-lib/mips-sgi-irix6.5/2.97/specs
Configured with: /usr/people/jarausch/ZIP/EGCS/gcc-cvs/configure --prefix=/usr/LOCAL --with-local-prefix=/usr/LOCAL --enable-haifa --enable-cpp --enable-c-cpplib
gcc version 2.97 20001119 (experimental)
the following tiny test fails on my IRIX 6.5.9 box
There were no problems with version up to 20001115
#include <string>
using std::string;
#include <iostream>
using std::cerr; using std::cout; using std::endl;
#include <fstream>
using std::ifstream; using std::ofstream;
int main() {
double x[10]={1,2,3,4,5,6,7,8,9,10};
double y[10]={17,72,73,74,75,76,77,78,79,710};
string OutputFN("test.out");
ofstream Out(OutputFN.c_str());
if ( ! Out ) return 1;
Out << 1.23 << " " << 4.56 << endl;
for ( int i= 0; i < 10; ++i )
Out << x[i] << " " << y[i] << endl;
Out.close();
}
/* test.out contains:
1.23 10 710
17
*/
/* replacing Out << by cout <<
I get (as expected)
1.23 4.56
1 17
2 72
3 73
4 74
5 75
6 76
7 77
8 78
9 79
10 710
*/
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany
More information about the Gcc-bugs
mailing list