diff mbox series

[documentation] Fix typo in access function attribute example

Message ID CAB1HuegjDdHLMnSHrQxw36B0Cz7nuSQhM6tP1Tip8fbMDqCuMw@mail.gmail.com
State New
Headers show
Series [documentation] Fix typo in access function attribute example | expand

Commit Message

Forrest Timour June 16, 2020, 9:21 a.m. UTC
Hi,

This patch fixes an off-by-one typo in the documentation example of the
access function attribute.

This is my first contribution and I don't have write access, so I will need
somebody to submit for me on approval.

Thanks,
Forrest

-------------------------------------------------------
Fix typo in documentation example of access function
attribute where the ref-indices should be one-indexed
instead of zero-indexed

2020-06-16  Forrest Timour  <forrest.timour@gmail.com>

gcc/ChangeLog:

        * doc/extend.texi:
---
 gcc/doc/extend.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Sebor June 17, 2020, 8:35 p.m. UTC | #1
On 6/16/20 3:21 AM, Forrest Timour via Gcc-patches wrote:
> Hi,
> 
> This patch fixes an off-by-one typo in the documentation example of the
> access function attribute.
> 
> This is my first contribution and I don't have write access, so I will need
> somebody to submit for me on approval.

Thank you!  I've committed it for you.

Martin

> 
> Thanks,
> Forrest
> 
> -------------------------------------------------------
> Fix typo in documentation example of access function
> attribute where the ref-indices should be one-indexed
> instead of zero-indexed
> 
> 2020-06-16  Forrest Timour  <forrest.timour@gmail.com>
> 
> gcc/ChangeLog:
> 
>          * doc/extend.texi:
> ---
>   gcc/doc/extend.texi | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
diff mbox series

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e656e66a80c..10dc32e6d2d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2527,7 +2527,7 @@  the @code{memcpy} function.
 
 @smallexample
 __attribute__ ((access (read_only, 1))) int puts (const char*);
-__attribute__ ((access (read_only, 1, 2))) void* memcpy (void*, const void*, size_t);
+__attribute__ ((access (read_only, 2, 3))) void* memcpy (void*, const void*, size_t);
 @end smallexample
 
 The @code{read_write} access mode applies to arguments of pointer types