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

--- Comment #9 from Jakub Ɓukasiewicz <dev at joren dot ga> ---
(In reply to Andrew Pinski from comment #7)
> Yes and that is still a VLA in terms of C99 definition ...

Indeed, but we only want to prevent automatic VLA, all other instances of VM
types are even encouraged.

(In reply to Andrew Pinski from comment #8)
> Note GCC's C++ front-end even rejects VLA definitions like that for
> parameters so I don't know how useful they are really.

The project is pure C and we really don't plan to convert it to C++ any time.
At the same time, (recently added) diagnostics for size checking array
parameter (https://godbolt.org/z/fdbheM8G9) could be really beneficial.
Also, allocating on heap multidimensional arrays of unknown size is really
convenient:

    int (*arr)[n][m] = malloc(sizeof *arr);

Reply via email to