On 10/05/2012 10:50 AM, Eric Blake wrote:

>> <stdint.h> and <limits.h> are the two main headers that are this
>> explicit about various macros being suitable for use in preprocessor
>> arithmetic, and preprocessor arithmetic cannot use casts or sizeof.
> 
> And I think this is a bug in POSIX

Never mind.  I wasn't looking hard enough.

> But nowhere in <limits.h>
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html#tag_13_23_03_06
> does it state that these macros inherited from C99 have the requirement
> of also being usable in #if preprocessing.

It doesn't state it in that area of the header, but rather at the top:

The <limits.h> header shall define macros and symbolic constants for
various limits. Different categories of limits are described below,
representing various limits on resources that the implementation imposes
on applications. All macros and symbolic constants defined in this
header shall be suitable for use in #if preprocessing directives.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to