[PATCH] Enable input using variable-width encodings
Pétur Runólfsson
peturr02@ru.is
Fri Sep 5 12:57:00 GMT 2003
Benjamin Kosnik wrote:
> Agreed. Testing now, and if it passes I'll check it in.
Thanks!
> I'm wondering a
> bit about using a signed type for _M_ext_buf_size when _M_buf_size is
> signed,
Did you mean unsigned?
> but am not too worried about it.
That is to allow the comparisons:
! if (_M_ext_buf_size < __blen)
and
! if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size)
without extra casts. These are the only places that
_M_ext_buf_size is used.
I agree that the current mix of size_t and streamsize in the
iostreams code is somewhat confusing. Maybe streamsize should
be used everywhere? (Some places need signed values, so
size_t wouldn't do.)
I forgot to mention that with this patch, the testcase for PR 9028
runs without errors.
Regards,
Petur
More information about the Gcc-patches
mailing list