[Bug libstdc++/88034] std::ws doesn't set failbit when the stream is already at EOF
markus.schoepflin at comsoft dot de
gcc-bugzilla@gcc.gnu.org
Thu Mar 19 09:09:27 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88034
Markus Schöpflin <markus.schoepflin at comsoft dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus.schoepflin at comsoft dot d
| |e
--- Comment #2 from Markus Schöpflin <markus.schoepflin at comsoft dot de> ---
This is fixed with the libstdc++ version provided with GCC 13 (as packaged by
Redhat in gcc-toolset-13-libstdc++-devel-13.3.1-2.2.el8_10.x86_64), but not GCC
11 (gcc-toolset-11-libstdc++-devel-11.2.1-9.2.el8_6.x86_64).
When I try the reproducer from this ticket with the mentioned g++13 I get the
correct output, when using -static-libstdc++:
eof/fail/bad bit values: 2, 4, 1
Initial state: 0
After reading "123": 2
After ws: 6
g++11 still gives me the wrong output.
More information about the Gcc-bugs
mailing list