https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997
Martin Sebor changed:
What|Removed |Added
Last reconfirmed||2020-12-18
See Also|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997
--- Comment #4 from Kari Nurmela ---
Yeah, well, I'm not claiming that there is anything wrong with the code
generation (especially argument passing) here, this is just a really minor
issue about the conformance of -Wvla with its documentation, a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997
--- Comment #3 from joseph at codesourcery dot com ---
The requirements on array declarators apply before parameter arrays decay
to pointers; see DR#047 (which concerns the case of an incomplete element
type - not itself a constraint violation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997
--- Comment #2 from Kari Nurmela ---
There is only one array in the program, "array", and that is not a variable
length array. The syntax in print_array doesn't take any position on the kind
of the array, only that there are at least "count" elem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85997
--- Comment #1 from 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 -Wc