PR middle-end/97552 - missing waning passing null to a VLA argument declared [static]
authorMartin Sebor <msebor@redhat.com>
Fri, 23 Oct 2020 18:37:38 +0000 (12:37 -0600)
committerMartin Sebor <msebor@redhat.com>
Fri, 23 Oct 2020 18:37:38 +0000 (12:37 -0600)
commit757ba6653c2699761c2243e0194749a6695112d8
tree9cbfe237f74cbb0fe21cf7631916f1273eb9e384
parent7991e963239160624b22a12caaacce95d3667e49
PR middle-end/97552 - missing waning passing null to a VLA argument declared [static]

gcc/ChangeLog:

PR middle-end/97552
* attribs.c (init_attr_rdwr_indices): Handle static VLA parameters.

gcc/c/ChangeLog:

PR middle-end/97552
* c-decl.c (get_parm_array_spec): Handle static VLA parameters.

gcc/testsuite/ChangeLog:

PR middle-end/97552
* gcc.dg/Wvla-parameter-2.c: Adjust text of expected warning.
* gcc.dg/Wnonnull-5.c: New test.
gcc/attribs.c
gcc/c/c-decl.c
gcc/testsuite/gcc.dg/Wnonnull-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wvla-parameter-2.c