[Bug c/98541] warning with -Wnonnull for array parameter with bound > 0

muecker at gwdg dot de gcc-bugzilla@gcc.gnu.org
Wed Jan 6 19:06:40 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98541

--- Comment #3 from Martin Uecker <muecker at gwdg dot de> ---

Having to set the length to 0 for NULL pointers is problematic also because
zero-sized array types are now allowed in ISO C.


On the other hand, an optional warning that warns for all parameters declared
as array which are NULL (fixed length and VLA) might be useful.


More information about the Gcc-bugs mailing list