From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686; Nav) Description of problem: stringstream operator >> does not work when used after operator <<. The following program does not print "5" in g++ 2.96 with libstdc++ 2.96 (it works OK in g++ 2.95, however): #include <sstream> main() { stringstream ss; int i=0; ss << 5; ss >> i; cout << i <<endl; } How reproducible: Always Steps to Reproduce: 1. compile the small sample code provided 2. execute 3. the output is 0 (incorrect) intead of 5 (correct). Actual Results: The output of the compiled program is 0 Expected Results: The output should be 5 Additional info:
I verified this problem also on updated Red Hat 7.0 and on Mandrake 8.2. So I guess it is a general problem of gcc 2.96 and a very nasty one. gcc 3.04, 3.1 and 2.95.x work fine.