You copied the Doc URL to your clipboard.

Type attributes

The __attribute__ keyword enables you to specify special attributes of variables or structure fields, functions, and types. The keyword format is either:

__attribute__ ((attribute1, attribute2, ...))
__attribute__ ((__attribute1__, __attribute2__, ...))

For example:

void * Function_Attributes_malloc_0(int b) __attribute__ ((malloc));
static int b __attribute__ ((__unused__));

Table 11 summarizes the available type attributes.

Table 11. Type attributes supported by the compiler and their equivalents
Type attributenon-attribute equivalent



[a] The __packed qualifier does not affect type in GNU mode.