On 05/29/2012 11:38 AM, Paul Eggert wrote: > On 05/28/2012 11:55 PM, Dmitry Antipov wrote: >> To avoid using 'packed' attribute and speedup an inefficient access to u.dat.size >> field, it's possible to use 'ptrdiff_t X : BITS_PER_PTRDIFF_T - 2' >> bitfields - it's still wide enough to hold the values up to STRING_BYTES_BOUND. > > That's not true on 32-bit hosts configured --with-wide-int. > On such hosts, a string can contain up to PTRDIFF_MAX - 1 bytes. > This proposal would lower the limit to PTRDIFF_MAX / 4 bytes. > In contrast, the proposal in > > would merely lower it to PTRDIFF_MAX - 65536 bytes. OK, this allows min (MOST_POSITIVE_FIXNUM, (ptrdiff_t) min (SIZE_MAX, PTRDIFF_MAX - 1) - 1) in all configurations (so PTRDIFF_MAX - 2 for --with-wide-int), eventually uses _all_ bits by eliminating signed values. Dmitry