On Jun 11, 2011, at 00:54, Gerriet M. Denkmann wrote:

> The 64-Bit Transition Guide for Cocoa just says:
> "The NS_BUILD_32_LIKE_64 macro is useful when binary compatibility is not a 
> concern, such as when building an application."
> 
> So: why is this NS_BUILD_32_LIKE_64 not always defined (as default) and what 
> binary compatibility issues I have to be aware of?

AFAIK there are 2 possible points of incompatibility: (a) libraries and (b) 
plugins.

I can't think of an ABI reason why C or Objective-C code should be incompatible 
(across library/plugin boundaries where this macro had different values during 
compilation), but there may be some obscure cases where an incompatibility 
exists. For example, it might be that int and long have different structure 
alignment implications in certain architectures, even if they're the same size.

It's also possible that Objective-C runtime things will break if they depend on 
@encode-style representations of types. However, the compilers are very 
cavalier with the @encode types, and at least in 64-bit compilations @encode 
types really only tell you sizes, not C types.

Of course, C++ or Objective-C++ code is going to be incompatible, because of 
name mangling.


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to