[PATCH v16 00/60] remove use of VLAs for Windows

Andre Muezerie andremue at linux.microsoft.com
Thu Jan 30 15:38:46 CET 2025


On Wed, Jan 29, 2025 at 04:57:16PM +0100, David Marchand wrote:
> On Thu, Jan 23, 2025 at 5:38 PM Andre Muezerie
> <andremue at linux.microsoft.com> wrote:
> > > > I see there is some back and forth on the topic of passing -Wvla.
> > > > It would be less fragile to put a -Wla in a upper level meson.build
> > > > (like config/meson.build for example), then disable explicitly in the
> > > > parts that are not ready.
> > > >
> > > > Something like:
> > > > diff --git a/config/meson.build b/config/meson.build
> > > > index 6aaad6d8a4..be603bd45b 100644
> > > > --- a/config/meson.build
> > > > +++ b/config/meson.build
> > > > @@ -348,6 +348,17 @@ foreach arg: warning_flags
> > > >      endif
> > > >  endforeach
> > > >
> > > > +if cc.has_argument('-Wvla')
> > > > +    add_project_arguments('-Wvla', language: 'c')
> > > > +    if not is_windows
> > > > +        no_vla_cflag = '-Wno-vla'
> > > > +    else
> > > > +        no_vla_cflag = []
> > > > +    endif
> > > > +else
> > > > +    no_vla_cflag = []
> > > > +endif
> > > > +
> > >
> > > Minor simplification suggestion, put "no_vla_cflag = []" outside the
> > > conditionals at the start, as the default value. Save having multiple
> > > copies of that assignment, and having to do "else" legs.
> >
> > These look like great improvements. I especially like the idea of using -Wvla from the very top.
> 
> Ok, can you work on a new revision and send it for the CI to have a try?
> Thanks.
> 
> 
> -- 
> David Marchand

Yes. I sent out v17 which incorporates the suggestions made.
--
Andre Muezerie


More information about the dev mailing list