PR c/84919 - bogus -Wrestrict on sprintf %p with destination as argument
authorMartin Sebor <msebor@redhat.com>
Thu, 23 Jan 2020 10:37:02 +0000 (11:37 +0100)
committerMartin Sebor <msebor@redhat.com>
Thu, 23 Jan 2020 10:37:02 +0000 (11:37 +0100)
commit8a990ffafaaa18981c6e91d4ed88f05ed74c5f3f
tree6f5fb53b4e87c5473a3c80a390e87440b1074396
parent0ed442a40f912b09297359ee3675c819c073208f
PR c/84919 - bogus -Wrestrict on sprintf %p with destination as argument

gcc/c-family/ChangeLog:

PR c/84919
* c-common.c (check_function_arguments): Avoid overlap checking
of sprintf functions.

gcc/testsuite/ChangeLog:

PR c/84919
* gcc.dg/Wrestrict-20.c: New test.
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wrestrict-20.c [new file with mode: 0644]