This is the mail archive of the gcc-patches@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]

[PATCH 4/4] Docs: extend.texi: Reword and rearrange attribute node introductions


The rearrangement performed in the previous patch left the text in
somewhat of an inconsistent state in terms of the flow of concepts;
this patch improves the flow of concepts to something more sane by
editing the introductions to these nodes:

  Attribute Syntax
  Type Attributes
  Variable Attributes
  Function Attributes

---
 trunk/gcc/doc/extend.texi |   53 +++++++++++++++++++++++++++-----------------
 1 files changed, 32 insertions(+), 21 deletions(-)

diff --git a/trunk/gcc/doc/extend.texi b/trunk/gcc/doc/extend.texi
index 3b453e5..a9611de 100644
--- a/trunk/gcc/doc/extend.texi
+++ b/trunk/gcc/doc/extend.texi
@@ -1962,10 +1962,22 @@
 @cindex attribute syntax
 
 This section describes the syntax with which @code{__attribute__} may be
-used, and the constructs to which attribute specifiers bind, for the C
+used, and the constructs to which attribute specifiers bind for the C
-language.  Some details may vary for C++ and Objective-C@.  Because of
+language and (to a limited degree) some of its descendants.
+
+The keyword @code{__attribute__} allows you to specify special
+attributes when making a declaration.  This keyword is followed by an
+attribute specification inside double parentheses.
+
+You may also specify attributes with @samp{__} preceding and following
+each keyword.  This allows you to use them in header files without
+being concerned about a possible macro of the same name.  For example,
+you may use @code{__noreturn__} instead of @code{noreturn}.
+
+GCC plugins may provide their own attributes.
+
-infelicities in the grammar for attributes, some forms described here
-may not be successfully parsed in all cases.
+Because of infelicities in the grammar for attributes, some forms
+described here may not be successfully parsed in all cases.
 
 There are some problems with the semantics of attributes in C++.  For
 example, there are no manglings for attributes, although they may affect
@@ -2191,6 +2203,9 @@
 @cindex attribute of types
 @cindex type attributes
 
+@xref{Attribute Syntax}, for details of the exact syntax for using
+attributes.
+
 The keyword @code{__attribute__} allows you to specify special
 attributes of @code{struct} and @code{union} types when you define
 such types.  This keyword is followed by an attribute specification
@@ -2583,6 +2598,9 @@
 @cindex attribute of variables
 @cindex variable attributes
 
+@xref{Attribute Syntax}, for details of the exact syntax for using
+attributes.
+
 The keyword @code{__attribute__} allows you to specify special
 attributes of variables or structure fields.  This keyword is followed
 by an attribute specification inside double parentheses.  Some
@@ -3214,14 +3232,17 @@
 @cindex functions that have different optimization options
 @cindex functions that are dynamically resolved
 
-In GNU C, you declare certain things about functions called in your program
-which help the compiler optimize function calls and check your code more
-carefully.
+@xref{Attribute Syntax}, for details of the exact syntax for using
+attributes.
 
-The keyword @code{__attribute__} allows you to specify special
-attributes when making a declaration.  This keyword is followed by an
-attribute specification inside double parentheses.  The following
-attributes are currently defined for functions on all targets:
+The keyword @code{__attribute__} allows you to specify special attributes
+of function declarations in order to help the compiler optimize function
+calls and check your code more carefully. This keyword is followed by
+an attribute specification inside double parentheses. Other attributes
+are available for types (@pxref{Type Attributes}) and for variables
+(@pxref{Variable Attributes}).
+
+The following attributes are currently defined for functions on all targets:
 @code{aligned}, @code{alloc_size}, @code{noreturn},
 @code{returns_twice}, @code{noinline}, @code{noclone},
 @code{always_inline}, @code{flatten}, @code{pure}, @code{const},
@@ -3237,16 +3258,6 @@
 including @code{section} are supported for variables declarations
 (@pxref{Variable Attributes}) and for types (@pxref{Type Attributes}).
 
-GCC plugins may provide their own attributes.
-
-You may also specify attributes with @samp{__} preceding and following
-each keyword.  This allows you to use them in header files without
-being concerned about a possible macro of the same name.  For example,
-you may use @code{__noreturn__} instead of @code{noreturn}.
-
-@xref{Attribute Syntax}, for details of the exact syntax for using
-attributes.
-
 @table @code
 @c Keep this table alphabetized by attribute name.  Treat _ as space.
 
-- 
1.7.4.18.g68fe8


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