[vlc-devel] [PATCH 09/12] network: io: Remove VLA usages
Rémi Denis-Courmont
remi at remlab.net
Wed Dec 9 17:30:56 CET 2020
Le mercredi 9 décembre 2020, 12:17:27 EET Hugo Beauzée-Luyssen a écrit :
> On Wed, Dec 9, 2020, at 10:31 AM, Rémi Denis-Courmont wrote:
> > VLA are required just like hosting and threads and atomics are
> > required. By VLC, and in the case of VLAs also by C99.
>
> It's a de-facto requirement because the code uses it, but I don't think
> there's a clear & hard requirement, and it seems fairly easy to remove.
It's a requirement de facto and de jure. Before VLAs we were using alloca().
We switched to VLAs as part of the switch to C99.
> It's indeed required by C99 but that's irrelevant since we don't use C99.
> > None of those are required by C11 and that's completely irrelevant, as
> > VLC is not meant to run on bare metal or historical ISAs.
>
> Yes, but we're not talking about running on those architecture AFAICS
Yes, so the fact that some parts of C11 are optional or platform-dependent is
irrelevant. VLC is not meant to run on a microcontroller that lacks the memory
or registers to support VLAs or threads, and for which those parts of the
specification were made optional.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list