From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C719384F003; Tue, 13 Jul 2021 15:56:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C719384F003 From: "SztfG at yandex dot ru" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: SztfG at yandex dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_file_loc bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 15:56:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101440 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 p= uts function, or the second and third arguments to the memcpy function. > __attribute__ ((access (read_only, 1, 2))) void* memcpy (void*, const voi= d*, size_t); There is no reference to "third argument in memcpy function". Or I don't understand something? Maybe there must be=20 __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 "siz= e_t n" bytes from "void *src"=