public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "SztfG at yandex dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug d/101440] New: Documentation bug for __attribute__ ((access))
Date: Tue, 13 Jul 2021 15:56:40 +0000	[thread overview]
Message-ID: <bug-101440-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101440

            Bug ID: 101440
           Summary: Documentation bug for __attribute__ ((access))
           Product: gcc
           Version: 10.1.0
               URL: https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Common-F
                    unction-Attributes.html
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: SztfG at yandex dot ru
  Target Milestone: ---

>From documentation:

> Examples of the use of the read_only access mode is the argument to the puts function, or the second and third arguments to the memcpy function.

> __attribute__ ((access (read_only, 1, 2))) void* memcpy (void*, const void*, size_t);

There is no reference to "third argument in memcpy function". Or I don't
understand something? Maybe there must be 

__attribute__ ((access (write_only, 1, 3), access (read_only, 2, 3))) void*
memcpy (void* restrict, const void* restrict, size_t);

so, if we have
void *memcpy(void *dest, const void *src, size_t n);

then this function can write "size_t n" bytes to "void *dest" and read "size_t
n" bytes from "void *src"

                 reply	other threads:[~2021-07-13 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101440-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).