This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/54265] New: Documentation of "preferred attribute syntax for Types" contradicts examples in info.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]