diff options
author | Dylan Baker <[email protected]> | 2019-11-21 09:11:45 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-11-26 12:48:11 -0800 |
commit | a24d6fbae60c01a39fe5a026fb568ab7facc6fbb (patch) | |
tree | 7bf0f523f70ffb02c213ec39bf5d08459f2cb65f /meson.build | |
parent | 25e58e37186d2ab2474391afe24cb895da50ccb0 (diff) |
meson: Add -Werror=gnu-empty-initializer to MSVC compat args
Only clang has this argument (at least as of clang 8 and gcc 9), which
errors when using the gcc empty initializer syntax in C:
```C
struct foo f = {};
```
GCC has a warning for this, but only when using -Wpedantic, which is a
lot of noise to lose useful warnings in.
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meson.build b/meson.build index e8bec9bb389..92e45d28640 100644 --- a/meson.build +++ b/meson.build @@ -996,10 +996,10 @@ else c_vis_args += '-fvisibility=hidden' endif - # Check for C and C++ arguments for MSVC2013 compatibility. These are only - # used in parts of the mesa code base that need to compile with old versions - # of MSVC, mainly common code - foreach a : ['-Werror=pointer-arith', '-Werror=vla'] + # 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 + foreach a : ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer'] if cc.has_argument(a) c_msvc_compat_args += a endif |