This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] _M_out_lim vs setp
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 16 Apr 2003 23:08:21 -0500
- Subject: Re: [Patch] _M_out_lim vs setp
- References: <3E9DCA2C.2050506@unitus.it>
>Basing on the semantics of _M_out_lim seems obvious that,
>upon setp() it should be equal to _M_out_beg. Then at each
>put operation it will move forward, toward _M_out_end.
>
>Consider, for instance, the effect of the _M_really_overflow
>call present in close(): if we didn't do any put operation
>we are not supposed to write out anything. However, since the
>former flushes all the chars between _M_out_beg and _M_out_lim,
>for a setp put area we end up writing garbage.
Aaagh.
Thanks for fixing this. Can you put this patch in, but also put the
first paragraph above into a comment in std_streambuf.h where the
_M_out_lim data member is introduced?
best,
benjamin