diff options
author | Joshua Ashton <joshua@froggi.es> | 2021-03-04 18:37:26 +0300 |
---|---|---|
committer | Joshua Ashton <joshua@froggi.es> | 2021-03-04 18:37:26 +0300 |
commit | 129b464c24f9331af1d3671f5c34a1fe031282ab (patch) | |
tree | 6d5e956023d4044249a0cc2ca5dfed9f8821372c | |
parent | 38bb8458006e2b2f58047eba28e9eaf922525d2c (diff) |
build: Warn about VLA usagedisallow-vla
Using consts for array sizes is a C++-ism, and in GCC in C-mode it won't fold literal constants, and will instead prefer to make a VLA.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
-rw-r--r-- | meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build index b3a46715..484c0c19 100644 --- a/meson.build +++ b/meson.build @@ -97,6 +97,9 @@ endif add_project_arguments(vkd3d_compiler.get_supported_arguments([ '-fvisibility=hidden', + # For some reason, the use of VLAs isn't in all+extra+pedantic + # We don't want to use these accidentally from consts... + '-Wvla', '-Wno-format', '-Wno-missing-field-initializers', '-Wno-unused-parameter', |