[cfe-dev] Weak pointer support on 32-bit platforms

Aaron Ballman aaron at aaronballman.com
Mon May 12 14:40:43 PDT 2014


On Mon, May 12, 2014 at 3:18 PM, Hovik Melikyan
<hovik.melikyan at gmail.com> wrote:
> On Mon, May 12, 2014 at 7:20 PM, Reid Kleckner <rnk at google.com> wrote:
>>
>> You can probably work around this with -D__GNUC__=4.
>>
>> However, why do you need -fms-compatibility if you are using MinGW?
>>
>
> Clang puts itself into MS compatibility mode when the target is e.g.
> i686-pc-win32. A better workaround for me was to use
> -fno-ms-compatibility.
>
> In any case, I don't think this
>
>     Builder.defineMacro("__weak", "__attribute__((objc_ownership(weak)))");
>
> was a good idea, as it makes some of the most critical attributes in
> Objective C dependent on a compiler extension (__attribute__) which is
> not always available at compile time!

It's plausible that we could implement them in terms of contextual
keywords which create the attributes, if there was sufficient desire.

~Aaron



More information about the cfe-dev mailing list