diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-24 04:57:22 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-24 04:57:22 +0000 |
commit | ca1324fe652dc5b971e73ae64e93d23415c35066 (patch) | |
tree | 0c627ad4feac7d2c50762bfd4f18677a3ecfc65c /libio/iostream.cc | |
parent | b72b8877d89a15cc40c34b008e3d62ac24e43d7e (diff) | |
download | gcc-ca1324fe652dc5b971e73ae64e93d23415c35066.tar.gz |
* iostream.cc (endl): Verify stream can accept characters
before writing its eol.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34122 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libio/iostream.cc')
-rw-r--r-- | libio/iostream.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libio/iostream.cc b/libio/iostream.cc index 4b75fca764d..cabda6bfede 100644 --- a/libio/iostream.cc +++ b/libio/iostream.cc @@ -963,7 +963,9 @@ ostream& ends(ostream& outs) ostream& endl(ostream& outs) { - return flush(outs.put('\n')); + if (opfx) + flush(outs.put('\n')); + return outs; } istream& lock(istream& ins) |