Re: __builtin_constant_p fails for Intel compilation?
Re: __builtin_constant_p fails for Intel compilation?
- Subject: Re: __builtin_constant_p fails for Intel compilation?
- From: Eric Albert <email@hidden>
- Date: Fri, 13 Jan 2006 00:35:55 -0800
On Jan 13, 2006, at 12:28 AM, Alexey Proskuryakov wrote:
On 12.01.2006 21:55, "Eric Albert" <email@hidden> wrote:
__builtin_constant_p sadly isn't sufficiently smart to realize that
this expression is constant. We already have a bug on this, but you
may want to file another one to raise the visibility of the first one.
Done, rdar://4407750. I wonder what it does recognize as a constant
expression, if not even a zero :)
The problem isn't that 0 is non-const, but rather than EndianU32_NtoB
doesn't expand to a constant expression.
That said, if you switch from EndianU32_NtoB to
OSSwapConstInt32HostToBig this'll work fine.
This doesn't appear to be available in 10.4u SDK (as of Xcode 2.2).
Is it
present in 2.2.1?
Sorry; I got the name wrong. It's OSSwapHostToBigConstInt32. As with
the other OSSwap* APIs, you can find it in <libkern/OSByteOrder.h>.
Hope this helps,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden