https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98541
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Uecker <uec...@gcc.gnu.org>: https://gcc.gnu.org/g:6e9ee44d96e5bda8808dd9d8ccf58d2525383f6b commit r14-5115-g6e9ee44d96e5bda8808dd9d8ccf58d2525383f6b Author: Martin Uecker <uec...@tugraz.at> Date: Thu Apr 13 19:35:15 2023 +0200 Reduce false positives for -Wnonnull for VLA parameters [PR98541] This patch limits the warning about NULL arguments to VLA parameters declared [static n]. PR c/98541 gcc/ * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_access_sizes): For VLA bounds in parameters, only warn about null pointers with 'static'. gcc/testsuite: * gcc.dg/Wnonnull-4.c: Adapt test. * gcc.dg/Wstringop-overflow-40.c: Adapt test.