[cfe-dev] Instance variables in implementation error?
David Chisnall
csdavec at swan.ac.uk
Mon Jul 4 02:39:17 PDT 2011
On 4 Jul 2011, at 07:59, Jens Ayton wrote:
> On Jul 4, 2011, at 07:12, Marcel Weiher wrote:
>>
>>
>> Yep. One solution would be to have the header-generator skip generating the variables for the @interfaces when compiling for 64 bit, and maintain the generation of the variables for 32 bit, but that's also pretty nasty.
>
> Two quasi-solutions:
> 1. Generate #ifndef __OBJC2__ around the generated ivar section, for maximum simplicity.
Wouldn't #if !__has_feature(objc_nonfragile_abi) be better? We use something similar for ABI-breaking changes in classes via some horrible macros.
This has the advantage that it lets you incrementally migrate to the non-fragile ABI - eventually you can just drop the ivar generating part of the header generator entirely, unless you have some ivars that are supposed to be shared.
Wrapping the ivars in the @implementation in the same conditional would have the same effect.
David
-- Sent from my brain
More information about the cfe-dev
mailing list