PR c/93640 - The write_only and read_write attributes can be mistyped due to invalid...
authorMartin Sebor <msebor@redhat.com>
Mon, 10 Feb 2020 17:27:00 +0000 (10:27 -0700)
committerMartin Sebor <msebor@redhat.com>
Mon, 10 Feb 2020 17:27:00 +0000 (10:27 -0700)
commit0cc575e4d8b68b743e07da02a74733f9b5cb585a
tree6e8707e3f9ef12fea691aaa40b99896e59d43180
parentd50ecb8388162b8485619c4817f3f24fc0da3357
PR c/93640 - The write_only and read_write attributes can be mistyped due to invalid strncmp size argument

gcc/c-family/ChangeLog:

PR c/93640
* c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.

gcc/testsuite/ChangeLog:

PR c/93640
* gcc.dg/attr-access.c: New test.
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/attr-access.c [new file with mode: 0644]