9.11.5 Copy Variable Attribute
The
copy attribute is used to apply a set of attributes to a
variable. This set is derived from the attributes applied to the variable
specified as the argument to the copy attribute. This is
particularly useful in libraries that define aliases, ensuring that the
aliases have the same attributes as the original symbols. It's important to
note that the copy attribute only duplicates syntactic and
semantic attributes. It does not copy attributes that influence a symbol's
linkage or visibility, such as alias or
weak. Additionally, the deprecated
attribute is not copied. For
example:int __attribute__((persistent))input;
int __attribute__((copy(input)))output;