This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enable input using variable-width encodings
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 Sep 2003 08:37:46 -0500
- Subject: Re: [PATCH] Enable input using variable-width encodings
- Organization: Red Hat / Paris
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F55BD@mail.ru.is>
>Thanks!
No, thank you...
>> 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?
Right, sorry for the confusion.
>> 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.
Right. I saw that.
>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.)
Yeah, that's what I am thinking too.
-benjamin