[Bug target/69179] undocumented darwin attributes "apple_kext_compatibility" and "weak_import"

howarth.at.gcc at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Jan 10 00:36:00 GMT 2016


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

--- Comment #1 from Jack Howarth <howarth.at.gcc at gmail dot com> ---
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.


More information about the Gcc-bugs mailing list