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

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Dec 9 16:47:18 CET 2020


On Wed, Dec 9, 2020, at 4:12 PM, Rémi Denis-Courmont wrote:
> Le mercredi 9 décembre 2020, 11:38:42 EET Thomas Guillem a écrit :
> > MSCV is a recent compiler, and we should support it
> 
> No?
> 
> The pragmatic reality is that development/debug builds must be done with GCC 
> or Clang to get all the diagnostics, test all the optimisations and simply to 
> keep your sanity and not keep hitting accidental compatibility regressions.
> 

Says who?! Why should we prevent VLC from being built on MSVC if it can? The latest versions supports C11 (excluding VLAs) so this patchset is more or less the only thing preventing it from happening (well, except potential VLA usages in the modules)
Of course I'm not going to submit a patchset removing the usage of _Generic, stdatomic.h or whatnot because older version of MSVC don't support it.
I'm not saying it should be mandatory to use MSVC either, and I'm sure as hell not saying that you should if you don't want to, but I'm definitely all for allowing people who want to use MSVC to do so.

> Likewise, production builds must be done with GCC or Clang again for the 
> optimisations, as well as for licensing reasons (which we've covered multiple 
> times in the past already).
> 

Who said anything about changing anything about the release builds?

> Considering that different people have different, and somtimes 
> conflicting, goals 
> and opinions, I do like to use the full C11 specification as an 
> *objective* 
> reference. I also think people should be allowed to use other complete 
> C11 
> compilers for research purpose. But I do note that some developers here 
> ostensibly don't even agree with that (see below).
> 

MSVC 16.8 is C11 compliant.

> However, I don't want to make the code slower, buggier and more complicated 

I have to agree with Steve here, I don't see how this patch changes anything about the error path of net_Accept since none are checking errno.
I'm not saying there is no bug, I'm saying that if there is, I don't see it. I don't oppose fixing bugs, and can submit additional patches to fix this.

> just to support "incomplete" C11 compilers. It's open-source so you are free 
> to fork if you want to but I don't want to have to deal with it.
> 

This sounds a lot like "If you disagree with me, get out", with which I'd have to disagree.

For the sake of clarity, are you opposed to removing VLAs from VLC's source code?
If not, let's have a calm discussion about what issues are introduced by this patchset, because for now I genuinely don't see them.

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list