Contents|Index|Previous|Next
 Specifying attributes of variables   

The keyword, __attribute__, allows you to specify special attributes of variables or structure fields. This keyword is followed by an at-tribute specification inside double parentheses. Eight attributes are currently defined for variables: aligned, mode, nocommon, packed, section, transparent_union, unused, and weak. Other attributes are available for functions (see Declaring attributes of functions) and for types (see Specifying attributes of types). You may also specify attributes with ‘__’ preceding and following each keyword. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, you may use __aligned__ instead of aligned. To specify multiple attributes, separate them by commas within the double parentheses: for example, __attribute__ ((aligned (16), packed)).

Top|Contents|Index|Previous|Next