Avoid assuming input corresponds to valid source code (PR c/97131).
authorMartin Sebor <msebor@redhat.com>
Wed, 23 Sep 2020 21:02:01 +0000 (15:02 -0600)
committerMartin Sebor <msebor@redhat.com>
Wed, 23 Sep 2020 21:02:01 +0000 (15:02 -0600)
commite92779db3304bc96a6b861f87c5edde8dd4d4030
tree952c25aeac4d9625c19a76489b8b44f1566948bd
parent37c3c297396af3229e9de35ef437f3614e0b4b87
Avoid assuming input corresponds to valid source code (PR c/97131).

gcc/c-family/ChangeLog:

PR c/97131
* c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.

gcc/testsuite/ChangeLog:

PR c/97131
* gcc.dg/Warray-parameter-6.c: New test.
gcc/c-family/c-warn.c
gcc/testsuite/gcc.dg/Warray-parameter-6.c [new file with mode: 0644]