ostream::operator<<(int) doesn't change the streams error state if streambuf::overflow returns eof. This works correctly in gcc-3.2.1. Release: gcc version 3.4 20030222 (experimental) Environment: Red Hat Linux 8.0 How-To-Repeat: See attachment.
Fix: Check _M_failed before writing and set it if the write failed. http://gcc.gnu.org/ml/libstdc++/2003-02/msg00393.html http://gcc.gnu.org/ml/libstdc++/2003-03/msg00110.html
Responsible-Changed-From-To: unassigned->jlquinn Responsible-Changed-Why: Fixed the bug
State-Changed-From-To: open->closed State-Changed-Why: Bug fixed in 3.3 and 3.4/mainline.