Can weak references refer to a variable (instead of a function)?
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Weak references are explained in section 6.30 of the GCC manual (Declaring Attributes of Functions). ^^^^^^^^^The example in that section declares a function x() as a weak reference to some symbol y in another translation unit/object file.
No mention of variables, either as the alias or the symbol referred to.All of this leads me to understand that weak references apply to functions only.
a. is that true for both the alias and the symbol to which it refers?b. with respect to the symbol referred to, does it matter what its storage class is (global extent, static local extent or automatic local extent)?
Thanks for any insight, Erik.