http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54265
Bug #: 54265
Summary: Documentation of "preferred attribute syntax for
Types" contradicts examples in info.
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: other
AssignedTo: [email protected]
ReportedBy: [email protected]
In the GCC info section 6.37 paragraph 4 reads:
[quote]For an enum, struct or union type, you may specify attributes either
between the enum, struct or union tag and the name of the type, or just
past the closing curly brace of the _definition_. The former syntax is
preferred.[/quote]
This implies that the preferred syntax is:
struct __attribute__ ((aligned (8))) S { short f[3]; };
Unfortunately all of the examples in the remaining documentation are formatted
as the the allegedly inferior:
struct S { short f[3]; } __attribute__ ((aligned (8)));
So either the word "former" in paragraph 4 should be "latter" or all the
examples are given in the non-preferred syntax, which is confusing.