[Piglit] [PATCH 2/3] Use alloca instead of variable length arrays

Jan Vesely jan.vesely at rutgers.edu
Thu Feb 12 10:51:16 PST 2015

On Thu, 2015-02-12 at 11:17 +0000, Emil Velikov wrote:
> On 11 February 2015 at 16:12, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > On Tue, 2015-02-10 at 10:28 -0800, Dylan Baker wrote:
> >> I just want to be clear I was asking a question, I don't really care one
> >> way or another, I would just rather not see code churn if it doesn't
> >> actually buy us anything.
> >
> > Not sure what the question is here. The idea is to force msvc like
> > limitations on other compilers by using -Werror= for unsupported
> > features. It should result in fewer commits like [0].
> > We can do it
> > a) globally even for stuff that is never built using msvc
> > b) per directory
> >
> > I think a) is better given that the required changes are minimal (only
> > the two posted patches), and using alloca instead gives identical
> > behavior. it makes codestyle consistent across files, and Jose's way of
> > removing the flags using string function seems a bit hacky to me
> >
> Do you have a rough number how many tests warn about VLA currently ?
> Must admit that I've very rarely look at the compilation output of
> piglit. That combined the fact that new piglits get added
> incrementally is a nice indication, imho, about one should handle
> this.
> Or in other words - it there are only a few of tests that need fixing,
> there should be no problem with adding this. Otherwise it's a
> different story.

When configured with all PIGLIT_BUILD_*_TESTS set to ON only the two
patches in this series (1/3, 2/3) are needed to make the entire tree
(0060f5998a) build with -Werror=declaration-after-statement -Werror=vla
(gcc 4.9.2, although I don't think these are version dependent)


> -Emil

Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150212/b297e7fc/attachment.sig>

More information about the Piglit mailing list