https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108561
--- Comment #2 from lavr at ncbi dot nlm.nih.gov --- Indeed, it does not. But the reason the endl manipulator is there, is to flush _after_ '\n'. If the stream has gone bad in between, it is the gray area, but for the output device (the stream buffer), it's an intentional corruption.