The manual says that: The packed attribute specifies that a variable or structure field should have the smallest possible alignment--one byte for a variable, and one bit for a field...
The variable part doesn't actually reflect reality: GCC and all other compilers I tested ignore the attribute with a warning on non-member objects, and only honor it on members. The part that reads "and one bit for a field" is also incorrect: it most likely meant to say bit-field. The attached change fixes both of these issues. Martin
gcc/ChangeLog: * doc/extend.texi (attribute packed): Correct typos. Index: gcc/doc/extend.texi =================================================================== --- gcc/doc/extend.texi (revision 265073) +++ gcc/doc/extend.texi (working copy) @@ -6220,13 +6220,13 @@ int f (struct Data *pd, const char *s) @item packed @cindex @code{packed} variable attribute -The @code{packed} attribute specifies that a variable or structure field -should have the smallest possible alignment---one byte for a variable, -and one bit for a field, unless you specify a larger value with the -@code{aligned} attribute. +The @code{packed} attribute specifies that a structure member should have +the smallest possible alignment---one one bit for a bit-field and one byte +otherwise, unless a larger value is specified with the @code{aligned} +attribute. The attribute does not apply to non-member objects. -Here is a structure in which the field @code{x} is packed, so that it -immediately follows @code{a}: +For example in the structure below, the member array @code{x} is packed +so that it immediately follows @code{a} with no intervening padding: @smallexample struct foo