Commit 8640a704 by Martin Sebor Committed by Martin Sebor

extend.texi (attribute access): Correct typos.

gcc/ChangeLog:

	* doc/extend.texi (attribute access): Correct typos.

From-SVN: r279398
parent 16570c12
2019-12-14 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (attribute access): Correct typos.
2019-12-14 Jakub Jelinek <jakub@redhat.com> 2019-12-14 Jakub Jelinek <jakub@redhat.com>
PR ipa/92357 PR ipa/92357
...@@ -2489,10 +2489,10 @@ The following attributes are supported on most targets. ...@@ -2489,10 +2489,10 @@ The following attributes are supported on most targets.
@itemx access (@var{access-mode}, @var{ref-index}, @var{size-index}) @itemx access (@var{access-mode}, @var{ref-index}, @var{size-index})
The @code{access} attribute enables the detection of invalid or unsafe The @code{access} attribute enables the detection of invalid or unsafe
accesses by functions to which they apply to or their callers, as well accesses by functions to which they apply or their callers, as well as
as write-only accesses to objects that are never read from. Such accesses write-only accesses to objects that are never read from. Such accesses
may be diagnosed by warnings such as @option{-Wstringop-overflow}, may be diagnosed by warnings such as @option{-Wstringop-overflow},
@option{-Wunnitialized}, @option{-Wunused}, and others. @option{-Wuninitialized}, @option{-Wunused}, and others.
The @code{access} attribute specifies that a function to whose by-reference The @code{access} attribute specifies that a function to whose by-reference
arguments the attribute applies accesses the referenced object according to arguments the attribute applies accesses the referenced object according to
...@@ -2501,13 +2501,13 @@ one of three names: @code{read_only}, @code{read_write}, or @code{write_only}. ...@@ -2501,13 +2501,13 @@ one of three names: @code{read_only}, @code{read_write}, or @code{write_only}.
The remaining two are positional arguments. The remaining two are positional arguments.
The required @var{ref-index} positional argument denotes a function The required @var{ref-index} positional argument denotes a function
argument of pointer (or in C++, refeference) type that is subject to argument of pointer (or in C++, reference) type that is subject to
the access. The same pointer argument can be referenced by at most one the access. The same pointer argument can be referenced by at most one
distinct @code{access} attribute. distinct @code{access} attribute.
The optional @var{size-index} positional argument denotes a function The optional @var{size-index} positional argument denotes a function
argument of integer type that specifies the maximum size of the access. argument of integer type that specifies the maximum size of the access.
The size is the number of elements of the type refefenced by @var{ref-index}, The size is the number of elements of the type referenced by @var{ref-index},
or the number of bytes when the pointer type is @code{void*}. When no or the number of bytes when the pointer type is @code{void*}. When no
@var{size-index} argument is specified, the pointer argument must be either @var{size-index} argument is specified, the pointer argument must be either
null or point to a space that is suitably aligned and large for at least one null or point to a space that is suitably aligned and large for at least one
...@@ -2520,10 +2520,10 @@ applies is used to read the referenced object but not write to it. Unless ...@@ -2520,10 +2520,10 @@ applies is used to read the referenced object but not write to it. Unless
the argument specifying the size of the access denoted by @var{size-index} the argument specifying the size of the access denoted by @var{size-index}
is zero, the referenced object must be initialized. The mode implies is zero, the referenced object must be initialized. The mode implies
a stronger guarantee than the @code{const} qualifier which, when cast away a stronger guarantee than the @code{const} qualifier which, when cast away
from a pointer, does not prevent a function from modifying the pointed-to from a pointer, does not prevent the pointed-to object from being modified.
object. Examples of the use of the @code{read_only} access mode is Examples of the use of the @code{read_only} access mode is the argument to
the argument to the @code{puts} function, or the second and third arguments the @code{puts} function, or the second and third arguments to
to the @code{memcpy} function. the @code{memcpy} function.
@smallexample @smallexample
__attribute__ ((access (read_only))) int puts (const char*); __attribute__ ((access (read_only))) int puts (const char*);
...@@ -2534,7 +2534,7 @@ The @code{read_write} access mode applies to arguments of pointer types ...@@ -2534,7 +2534,7 @@ The @code{read_write} access mode applies to arguments of pointer types
without the @code{const} qualifier. It specifies that the pointer to which without the @code{const} qualifier. It specifies that the pointer to which
it applies is used to both read and write the referenced object. Unless it applies is used to both read and write the referenced object. Unless
the argument specifying the size of the access denoted by @var{size-index} the argument specifying the size of the access denoted by @var{size-index}
is zero, the object refrenced by the pointer must be initialized. An example is zero, the object referenced by the pointer must be initialized. An example
of the use of the @code{read_write} access mode is the first argument to of the use of the @code{read_write} access mode is the first argument to
the @code{strcat} function. the @code{strcat} function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment