This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]