[PATCH] correct/improve handling of null VLA arguments (PR 97188)

Martin Sebor msebor@gmail.com
Fri Sep 25 00:15:01 GMT 2020


The machinery recently added to support -Warray-parameter and
-Wvla-parameter also results in enhanced detection of null
pointer arguments to VLA function parameters.  This enhancement
wasn't tested as comprehensively as it should have been and
so has some bugs.  The attached patch fixes one that leads
to an ICE.  It also restructures the function and improves
the warning issues in this case.

The fix is slightly bit bigger than what I would normally commit
without a review but since it's all in code I just wrote and in
my view low risk I will go ahead and push it in a few days unless
I hear requests for changes by then.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-97188.diff
Type: text/x-patch
Size: 17683 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200924/6016f46d/attachment-0001.bin>


More information about the Gcc-patches mailing list