This variable attribute enables you to specify multiple aliases for a variable.
Aliases must be declared in the same translation unit as the definition of
the original variable.
Note:
Aliases cannot be specified in block scope. The compiler ignores aliasing
attributes attached to local variable definitions and treats the variable definition as a
normal local definition.
In the output object file, the compiler replaces alias references with a reference to the
original variable name, and emits the alias alongside the original name. For example:
int oldname = 1;
extern int newname __attribute__((alias("oldname")));
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.