3.21 Type attributes

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

The keyword format is either of the following:
__attribute__((attribute1, attribute2, ...))
__attribute__((__attribute1__, __attribute2__, ...))
For example:
typedef union { int i; float f; } U __attribute__((transparent_union));
The available type attributes are as follows:
  • __attribute__((aligned))
  • __attribute__((packed))
  • __attribute__((transparent_union))
Related reference
3.22 __attribute__((aligned)) type attribute
3.24 __attribute__((transparent_union)) type attribute
3.23 __attribute__((packed)) type attribute
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.