Similarly to commit 64c1a544352 ("meson: Enable -Wvla") with variable length arrays, forbid alloca() uses on system code. There are few uses on ancient linux-user code, do not bother there. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Stefan Hajnoczi --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 0d42de61ae6..3d1dc2e9e26 100644 --- a/meson.build +++ b/meson.build @@ -775,6 +775,10 @@ if host_os != 'darwin' endif endif +if have_system + warn_flags += ['-Walloca'] +endif + # Set up C++ compiler flags qemu_cxxflags = [] if 'cpp' in all_languages -- 2.51.0