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é <phi...@linaro.org> --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index ef994676fe9..8c6ccb03c71 100644 --- a/meson.build +++ b/meson.build @@ -774,6 +774,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.49.0