From: Paul Koning Date: Wed, 11 Jul 2018 19:06:41 +0000 (-0400) Subject: Add documentation for "mode" attribute for types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf8218dbef82171f9e370d23cce6b6e4f4e1c3bb;p=gcc.git Add documentation for "mode" attribute for types. * doc/extend.texi (Common Variable Attributes): Move "mode" into alphabetical order. (Common Type Attributes): Add "mode" attribute. From-SVN: r262561 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d94165b7168..cebe2bc6478 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-07-11 Paul Koning + + * doc/extend.texi (Common Variable Attributes): Move "mode" into + alphabetical order. + (Common Type Attributes): Add "mode" attribute. + 2018-07-11 Jan Hubicka * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index c7745c4efb7..954e8a1dd94 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -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 compiled with @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