This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: [PATCH] Enable input using variable-width encodings
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: "Benjamin Kosnik" <bkoz at redhat dot com>
- Cc: <libstdc++ at gcc dot gnu dot org>,<gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Sep 2003 12:57:00 -0000
- Subject: RE: [PATCH] Enable input using variable-width encodings
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