From a4df94a0330e25efdd9707087fd7365722a47d51 Mon Sep 17 00:00:00 2001 From: Forrest Timour Date: Wed, 17 Jun 2020 14:29:07 -0600 Subject: [PATCH] Fix typo in attribute access example. Fix typo in documentation example of access function attribute where the ref-indices should be one-indexed instead of zero-indexed. gcc/ChangeLog: * doc/extend.texi (attribute access): Fix a typo. --- gcc/doc/extend.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2