[vlc-devel] [PATCH 09/12] network: io: Remove VLA usages

Pierre Ynard linkfanel at yahoo.fr
Thu Dec 10 21:21:04 CET 2020

> The vote won't be about this patchset, but about an agreement for VLA
> removal in VLC.

I don't think that's the right question. I think a better question would
be whether to require VLA support, or whether to support platforms
without it.

VLAs are a feature that's not available everywhere like many others,
and I suppose we can detect it. The favored strategy for such features
usually isn't complete removal. One strategy is to add an implementation
in the internal compatibility layer, so the feature can be treated like
it's always available. In this case, VLAs are a language feature so
it's a bit more complicated: it would require something like a compiler
plugin, and I don't know if that's possible at all with MSVC.

Another strategy is to use #ifdef's or platform specific code. I'm not
saying this should be the favored solution in general, because it deals
with variable declarations so it's annoying to handle; but in some cases
where we deem performance or error management critical, maybe it can be
a solution to maintain MSVC support in a less detrimental way.

So in my opinion this might very much be a case-by-case issue, and
that's why I think it's a bit early to call for a vote on a blanket

Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."

More information about the vlc-devel mailing list