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: Add <limits.h> integer width macros


On Wed, 14 Sep 2016, Paul Eggert wrote:

> On 09/13/2016 10:49 AM, Joseph Myers wrote:
> > +#  define UINT_WIDTH 32
> 
> Dumb question: In the latest draft I could find
> <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1899.pdf>, these macros are
> supposed to be expressions of type size_t. Was this changed from 'size_t' to
> 'int' in the final standard? That would make sense, as these values are likely
> to be used in shift-width contexts where negative numbers can be useful.

That's an independent proposal; it has nothing to do with the feature in 
TS 18661-1 (and presumably won't be adopted, since TS 18661-1 is likely to 
be merged into C2X).  TS 18661-1 does not specify the types of these 
macros, but int seems the most natural.

-- 
Joseph S. Myers
joseph@codesourcery.com


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