[Bug c/85997] Bogus -Wvla warning from function array argument with size expression
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 1 16:22:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Well, that's a VLA before the decay to pointer type, and thus violates the
C90 constraint referenced in the diagnostic. So a diagnostic is obviously
required with -std=c90 -pedantic or -Wc90-c99-compat, even if there are
certain other uses of -Wvla for which you only want warnings about e.g.
code that actually allocates memory for a VLA.
More information about the Gcc-bugs
mailing list