[cfe-dev] clang defines __weak as if -fobjc-gc were specified

Frank Rehwinkel frankrehwinkel at gmail.com
Wed Jun 5 10:04:19 PDT 2013


Thanks for asking.  I just want to make sure I understand your statement
and question.  On Darwin, you've always had __weak defined as
__attribute__((objc_gc(weak))),
even when __strong is defined as <empty>?

If it is intentional, then I would say there is no specific problem.  We
can put a comment into the header file for GNUstep to explain why __weak is
being undef'ed before it is defined as <empty>.  (Without the undef, the
build generates seemingly hundreds of warnings, obscuring other warnings
that might be more meaningful.)

If it is unintentional, then a change to clang would obviate the additional
code in the GNUstep header and save a few seconds every time someone went
to read through the logic of those __strong and __weak macro definitions.

-Frank


On Wed, Jun 5, 2013 at 12:26 PM, John McCall <rjmccall at apple.com> wrote:

> On Jun 1, 2013, at 5:00 AM, Frank Rehwinkel <frankrehwinkel at gmail.com>
> wrote:
> > This is with a clang built from trunk head yesterday.
>
> Yes, this is what we've always done on Darwin.  Is there a problem
> specifically?
>
> John.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130605/5fca0792/attachment.html>


More information about the cfe-dev mailing list