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 <[email protected]>
gcc/ChangeLog:
* doc/extend.texi:
---
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