meson.build: disable -Wsuggest-override with GCC 8

This commit is contained in:
Max Kellermann 2021-05-25 22:22:40 +02:00
parent 0b0acb3981
commit 56c0733b42
1 changed files with 6 additions and 1 deletions

View File

@ -72,7 +72,6 @@ test_cxxflags = test_common_flags + [
'-Woverloaded-virtual',
'-Wshadow',
'-Wsign-promo',
'-Wsuggest-override',
'-Wunused',
'-Wvolatile',
'-Wvirtual-inheritance',
@ -89,6 +88,12 @@ test_cxxflags = test_common_flags + [
'-Wused-but-marked-unused',
]
if compiler.get_id() != 'gcc' or compiler.version().version_compare('>=9')
# The GCC 8 implementation of this flag is buggy: it complains even
# if "final" is present, which implies "override".
test_cxxflags += '-Wsuggest-override'
endif
test_cflags = test_common_flags + [
'-Wcast-qual',
'-Wmissing-prototypes',