> On Feb 27, 2015, at 4:14 PM, Rick Mann <rm...@latencyzero.com> wrote:
> 
> I thought setting NS_BUILD_32_LIKE_64 = 1 would make CGFloat be double, but 
> CGFloat seems to be conditionalized on __LP64__ (at least, on iOS.
> 
> I'm building iOS for both 32 and 64 bit devices. What should I do here? I'm 
> trying to get rid of a bunch of implicit conversion warnings. Thanks.

NS_BUILD_32_LIKE_64 can't do that. `float` and `double` have different sizes on 
all architectures. If NS_BUILD_32_LIKE_64 redefined CGFloat then it would break 
things like struct CGRect.

NS_BUILD_32_LIKE_64 does only one thing: it changes NSInteger from `long` to 
`int` and NSUInteger from `unsigned long` to `unsigned int`. That has no effect 
on storage size on 32-bit; it only changes things like C++ overloading and 
Objective-C @encode strings that most code won't notice.

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Cocoa64BitGuide/64BitChangesCocoa/64BitChangesCocoa.html#//apple_ref/doc/uid/TP40004247-CH4-SW2


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to