Commit 36680607 authored by Max Kellermann's avatar Max Kellermann

meson.build: use some warning options for plain C as well

parent fc54877c
...@@ -47,14 +47,20 @@ test_global_common_flags = [ ...@@ -47,14 +47,20 @@ test_global_common_flags = [
] ]
test_common_flags = [ test_common_flags = [
'-ffast-math',
'-ftree-vectorize',
'-Wcast-qual', '-Wcast-qual',
'-Wdouble-promotion', '-Wdouble-promotion',
'-Wmissing-declarations',
'-Wshadow', '-Wshadow',
'-Wunused',
'-Wvla', '-Wvla',
'-Wwrite-strings', '-Wwrite-strings',
'-ffast-math', # clang specific warning options:
'-ftree-vectorize', '-Wunreachable-code-aggressive',
'-Wused-but-marked-unused',
] ]
test_global_cxxflags = test_global_common_flags + [ test_global_cxxflags = test_global_common_flags + [
...@@ -70,10 +76,8 @@ test_cxxflags = test_common_flags + [ ...@@ -70,10 +76,8 @@ test_cxxflags = test_common_flags + [
'-Wcomma-subscript', '-Wcomma-subscript',
'-Wextra-semi', '-Wextra-semi',
'-Wmismatched-tags', '-Wmismatched-tags',
'-Wmissing-declarations',
'-Woverloaded-virtual', '-Woverloaded-virtual',
'-Wsign-promo', '-Wsign-promo',
'-Wunused',
'-Wvolatile', '-Wvolatile',
'-Wvirtual-inheritance', '-Wvirtual-inheritance',
...@@ -84,8 +88,6 @@ test_cxxflags = test_common_flags + [ ...@@ -84,8 +88,6 @@ test_cxxflags = test_common_flags + [
'-Wcomma', '-Wcomma',
'-Wheader-hygiene', '-Wheader-hygiene',
'-Winconsistent-missing-destructor-override', '-Winconsistent-missing-destructor-override',
'-Wunreachable-code-aggressive',
'-Wused-but-marked-unused',
] ]
if compiler.get_id() != 'gcc' or compiler.version().version_compare('>=9') if compiler.get_id() != 'gcc' or compiler.version().version_compare('>=9')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment