[RFC/patch] Fixing libstdc++/11378 and, while at it... ;)

Paolo Carlini pcarlini@unitus.it
Wed Jul 2 12:45:00 GMT 2003


Hi Jerry,

thanks for your comments. Just a quick reply:

> > +	if(__testout && !_M_reading && this->_M_buf_size == 1
>
>Should this be _M_buf_size >= 1?
>
He! What I wrote works as is only for the unbuffered case (_M_buf_size 
== 1), and with further tweaks (like those you proposed) would fix 
nicely 11378, which is about that.

For the buffered case, before issuing a low level _M_file.xsputn we 
*must* flush the current buffer! Should be not difficult but there are 
many different options. I'm planning to work on that in the next days.

> > +	   && __check_facet(_M_codecvt).always_noconv())
>
>always_noconv() is another virtual.  The answer to this could be
>cached in a bool.  That will avoid the __check_facet test and the
>virtual call.
>
Thanks!

Paolo.



More information about the Libstdc++ mailing list