On Sun, Oct 5, 2008 at 3:54 PM, Chris Lattner <[EMAIL PROTECTED]> wrote:
>
> On Oct 5, 2008, at 3:44 PM, Eli Friedman wrote:
>
>> On Sun, Oct 5, 2008 at 1:06 PM, Chris Lattner <[EMAIL PROTECTED]> wrote:
>>>
>>> it changes sizeof(long) to 16-bits (to match
>>> the size of pointer).
>>
>> Doesn't this violate the C standard?  AFAIK, long is required to be at
>> least 32 bits.
>
> I'm pretty sure it just has to be >= sizeof(int) and <= sizeof(long long).

All right, I dug up the reference:
C99 5.2.4.2.1p1:
Their implementation-defined values shall be equal or greater in magnitude
(absolute value) to those shown, with the same sign.

And a bit lower:
― maximum value for an object of type unsigned long int
ULONG_MAX         4294967295 // 2^32 − 1

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to