4.5.5. __attribute__((packed))

The packed variable attribute specifies that a variable or structure field has the smallest possible alignment. That is, one byte for a variable, and one bit for a field, unless you specify a larger value with the aligned attribute.

Note

This variable attribute is a GNU compiler extension that is supported by the ARM compiler.

Example

struct
{
    char a;
    int b __attribute__ ((packed));
} Variable_Attributes_packed_0;

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential