From c21dfe3348694c23fff120b2286ff01402257294 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 23 May 2022 11:58:55 +0200 Subject: [PATCH] meson: add back -Werror=vla to msvc compat flags Back when STATIC_ASSERT was prepared for use in common code, the -Werror=vla flag was removed from the MSVC compat flags. But now we're using C++11 / C11 static asserts instead, so we can add it back again. This should help us noticing some breakages before they happen. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Jesse Natalie Part-of: --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index fe6b0c63abb..209b36c2717 100644 --- a/meson.build +++ b/meson.build @@ -1240,7 +1240,7 @@ else # Check for C and C++ arguments for MSVC compatibility. These are only used # in parts of the mesa code base that need to compile with MSVC, mainly # common code - _trial_msvc = ['-Werror=pointer-arith', '-Werror=gnu-empty-initializer'] + _trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer'] c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc) cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc) endif