This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Don't discuss details of what type size_t might be typedefedto


On 02/26/2012 05:05 PM, Joseph S. Myers wrote:
> I think it's best just to
> describe size_t abstractly without detailing particular types it might
> be equivalent to.

Some fixes are needed in this area, but I think this goes too far.

First, although the C standard allows size_t to be
'unsigned short' or even 'unsigned char', glibc doesn't
now and is unlikely ever port to any such host.  It'd be a pain for
application writers to worry about such (theoretical) platforms,
so it's helpful for the manual to say that size_t is no narrower
than 'unsigned int'.

Second, the C standard recommends that size_t shouldn't have
an integer conversion rank greater than 'long' unless it's necessary.
For application writers' benefit, the glibc manual should document
the platforms where it's really necessary for size_t to be wider than
'unsigned long'.  Currently this is the empty set for glibc, and the
manual should document that.


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