[cfe-commits] r57132 - in /cfe/trunk: include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/Lex/Preprocessor.cpp
Chris Lattner
sabre at nondot.org
Sun Oct 5 18:30:34 PDT 2008
On Oct 5, 2008, at 4:07 PM, Eli Friedman wrote:
> On Sun, Oct 5, 2008 at 3:54 PM, Chris Lattner <sabre at nondot.org>
> wrote:
>>
>> On Oct 5, 2008, at 3:44 PM, Eli Friedman wrote:
>>
>>> On Sun, Oct 5, 2008 at 1:06 PM, Chris Lattner <sabre at nondot.org>
>>> 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
Ok, well I'll let the pic guys figure it out. The definition of
__MAX_INT__ etc was completely wrong, so I think there are other
issues at work here. They also live in a world defined by pragmatics,
I don't know that they really care what the standard says so long as
they get decent perf/size on their device.
-Chris
More information about the cfe-commits
mailing list