On this page
6.34 Specifying Attributes of Variables ¶
The keyword __attribute__
allows you to specify special properties of variables, function parameters, or structure, union, and, in C++, class members. This __attribute__
keyword is followed by an attribute specification enclosed in double parentheses. Some attributes are currently defined generically for variables. Other attributes are defined for variables on particular target systems. Other attributes are available for functions (see Declaring Attributes of Functions), labels (see Label Attributes), enumerators (see Enumerator Attributes), statements (see Statement Attributes), and for types (see Specifying Attributes of Types). Other front ends might define more attributes (see Extensions to the C++ Language).
See Attribute Syntax, for details of the exact syntax for using attributes.
- Common Variable Attributes
- ARC Variable Attributes
- AVR Variable Attributes
- Blackfin Variable Attributes
- H8/300 Variable Attributes
- IA-64 Variable Attributes
- LoongArch Variable Attributes
- M32R/D Variable Attributes
- Microsoft Windows Variable Attributes
- MSP430 Variable Attributes
- Nvidia PTX Variable Attributes
- PowerPC Variable Attributes
- RL78 Variable Attributes
- V850 Variable Attributes
- x86 Variable Attributes
- Xstormy16 Variable Attributes
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Variable-Attributes.html