diff mbox series

doc: add missing "mode" type attribute

Message ID 16FEED26-A65D-4287-B1EE-C4634CA86FEE@comcast.net
State New
Headers show
Series doc: add missing "mode" type attribute | expand

Commit Message

Paul Koning July 10, 2018, 4:50 p.m. UTC
"mode" is documented as a variable attribute but not as a type attribute.  This fixes that omission.  I simply copied the other text, it seemed suitable as it stands.

The attributes are normally listed in alphabetical order but "mode" was out of order in the variable attributes.

Ok for trunk?

	paul

ChangeLog:

2018-07-10  Paul Koning  <ni1d@arrl.net>

	* doc/extend.texi (Common Variable Attributes): Move "mode" into
	alphabetical order.
	(Common Type Attributes): Add "mode" attribute.

Comments

Jeff Law July 11, 2018, 4:14 p.m. UTC | #1
On 07/10/2018 10:50 AM, Paul Koning wrote:
> "mode" is documented as a variable attribute but not as a type attribute.  This fixes that omission.  I simply copied the other text, it seemed suitable as it stands.
> 
> The attributes are normally listed in alphabetical order but "mode" was out of order in the variable attributes.
> 
> Ok for trunk?
> 
> 	paul
> 
> ChangeLog:
> 
> 2018-07-10  Paul Koning  <ni1d@arrl.net>
> 
> 	* doc/extend.texi (Common Variable Attributes): Move "mode" into
> 	alphabetical order.
> 	(Common Type Attributes): Add "mode" attribute.
OK.
jeff
diff mbox series

Patch

Index: doc/extend.texi
===================================================================
--- doc/extend.texi	(revision 262540)
+++ doc/extend.texi	(working copy)
@@ -6123,6 +6123,19 @@  types (@pxref{Common Function Attributes},
 The message attached to the attribute is affected by the setting of
 the @option{-fmessage-length} option.
 
+@item mode (@var{mode})
+@cindex @code{mode} variable attribute
+This attribute specifies the data type for the declaration---whichever
+type corresponds to the mode @var{mode}.  This in effect lets you
+request an integer or floating-point type according to its width.
+
+@xref{Machine Modes,,, gccint, GNU Compiler Collection (GCC) Internals},
+for a list of the possible keywords for @var{mode}.
+You may also specify a mode of @code{byte} or @code{__byte__} to
+indicate the mode corresponding to a one-byte integer, @code{word} or
+@code{__word__} for the mode of a one-word integer, and @code{pointer}
+or @code{__pointer__} for the mode used to represent pointers.
+
 @item nonstring
 @cindex @code{nonstring} variable attribute
 The @code{nonstring} variable attribute specifies that an object or member
@@ -6158,19 +6171,6 @@  int f (struct Data *pd, const char *s)
 @}
 @end smallexample
 
-@item mode (@var{mode})
-@cindex @code{mode} variable attribute
-This attribute specifies the data type for the declaration---whichever
-type corresponds to the mode @var{mode}.  This in effect lets you
-request an integer or floating-point type according to its width.
-
-@xref{Machine Modes,,, gccint, GNU Compiler Collection (GCC) Internals},
-for a list of the possible keywords for @var{mode}.
-You may also specify a mode of @code{byte} or @code{__byte__} to
-indicate the mode corresponding to a one-byte integer, @code{word} or
-@code{__word__} for the mode of a one-word integer, and @code{pointer}
-or @code{__pointer__} for the mode used to represent pointers.
-
 @item packed
 @cindex @code{packed} variable attribute
 The @code{packed} attribute specifies that a variable or structure field
@@ -7112,6 +7112,19 @@  declaration, the above program would abort when co
 @option{-fstrict-aliasing}, which is on by default at @option{-O2} or
 above.
 
+@item mode (@var{mode})
+@cindex @code{mode} type attribute
+This attribute specifies the data type for the declaration---whichever
+type corresponds to the mode @var{mode}.  This in effect lets you
+request an integer or floating-point type according to its width.
+
+@xref{Machine Modes,,, gccint, GNU Compiler Collection (GCC) Internals},
+for a list of the possible keywords for @var{mode}.
+You may also specify a mode of @code{byte} or @code{__byte__} to
+indicate the mode corresponding to a one-byte integer, @code{word} or
+@code{__word__} for the mode of a one-word integer, and @code{pointer}
+or @code{__pointer__} for the mode used to represent pointers.
+
 @item packed
 @cindex @code{packed} type attribute
 This attribute, attached to @code{struct} or @code{union} type
Index: doc/md.texi
===================================================================
--- doc/md.texi	(revision 262540)
+++ doc/md.texi	(working copy)
@@ -10263,7 +10263,11 @@  the expression from the original pattern, which ma
 @code{match_operand N} from the input pattern.  As a consequence,
 @code{match_dup} cannot be used to point to @code{match_operand}s from
 the output pattern, it should always refer to a @code{match_operand}
-from the input pattern.
+from the input pattern.  If a @code{match_dup N} occurs more than once
+in the output template, its first occurrence is replaced with the
+expression from the original pattern, and the subsequent expressions
+are replaced with @code{match_dup N}, i.e., a reference to the first
+expression.
 
 In the output template one can refer to the expressions from the
 original pattern and create new ones.  For instance, some operands could