PR c/88065 - ICE in -Wsizeof-pointer-memaccess on an invalid strncpy
authorMartin Sebor <msebor@redhat.com>
Wed, 28 Nov 2018 23:04:09 +0000 (23:04 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 28 Nov 2018 23:04:09 +0000 (16:04 -0700)
commit04864ec855832e92a6be3b0686fdb8b621276e67
tree86c31dd4e824dcb05e04d8850dd75321d515e2a7
parent15684250225252a6ef74a7c3779294ca5aa0c16c
PR c/88065 - ICE in -Wsizeof-pointer-memaccess on an invalid strncpy

PR c/88065 - ICE in -Wsizeof-pointer-memaccess on an invalid strncpy
PR c/87297 - ICE on strncpy with an undeclared argument

gcc/c-family/ChangeLog:

PR c/88065
PR c/87297
* c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
or destination is an error.

gcc/testsuite/ChangeLog:

PR c/88065
PR c/87297
* c-c++-common/Wsizeof-pointer-memaccess4.c: New test.

From-SVN: r266594
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess4.c [new file with mode: 0644]