This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/54265] New: Documentation of "preferred attribute syntax for Types" contradicts examples in info.
- From: "rwhite at pobox dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Aug 2012 23:05:10 +0000
- Subject: [Bug other/54265] New: Documentation of "preferred attribute syntax for Types" contradicts examples in info.
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: rwhite@pobox.com
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.