https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69179

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-01-10
     Ever confirmed|0                           |1

--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jack Howarth from comment #1)
> Note that weak_import was added by Geoffrey Keating in...
> 
> https://gcc.gnu.org/ml/gcc-patches/2004-10/msg02441.html
> 
> and tweaked in...
> 
> https://gcc.gnu.org/ml/gcc-patches/2005-01/msg00146.html
> 
> The last time Geoff referenced it in a patch, he claimed it was 'effectively
> deprecated' in gcc...
> 
> https://gcc.gnu.org/ml/gcc-patches/2005-12/msg00378.html
> 
> It might be worth checking with the Apple clang developers to see what their
> current position is on the feature. I would note that
> http://clang.llvm.org/docs/AttributeReference.html has...
> 
> A declaration can be used even when deploying back to a platform version
> prior to when the declaration was introduced. When this happens, the
> declaration is weakly linked, as if the weak_import attribute were added to
> the declaration. A weakly-linked declaration may or may not be present a
> run-time, and a program can determine whether the declaration is present by
> checking whether the address of that declaration is non-NULL.
> 
> in the section describing the availability attribute so I guess they still
> intend to support into the future.

GCC currently treats "weak_import" as a different spelling for "weak" (barring
one additional check for inlined functions made in the "weak" case - which we
should probably add for weak_import).  AFAIU, there is no practical difference
in the meaning of weak_import, c.f. weak.

Reply via email to