bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: examples/loadables/getconf.c


From: Eric Blake
Subject: Re: examples/loadables/getconf.c
Date: Fri, 05 Oct 2012 10:54:42 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]