Disabled array-bounds warnings for GCC due to (probably?) false positives.

This commit is contained in:
Patrick 2025-07-25 00:50:17 +02:00
parent 7fc8518db4
commit e19f6115be

View File

@ -1239,9 +1239,10 @@ if env['COMPILER_FAMILY'] == 'gcc' or env['COMPILER_FAMILY'] == 'clang':
# also GCC complains about some (compiler generated) fields in coroutines not having any linkage
# also -Wdangling-reference seems to produce a lot of false positives
# also -Wmaybe-uninitialized seems to produce false positives (or a bug in the standard library?))
# also -Warray-bounds because GCC kept complaining when I was constructing a string from a string_view
# -Winit-list-lifetime triggers in vulkan.hpp even though it is disabled via pragma :/
# -Wtautological-compare triggers in libfmt and doesn't seem too useful anyway
env.Append(CCFLAGS = ['-Wno-missing-field-initializers', '-Wno-maybe-uninitialized'])
env.Append(CCFLAGS = ['-Wno-missing-field-initializers', '-Wno-maybe-uninitialized', '-Wno-array-bounds'])
env.Append(CXXFLAGS = ['-Wno-subobject-linkage', '-Wno-dangling-reference', '-Wno-init-list-lifetime', '-Wno-tautological-compare'])
else: # clang only
# no-gnu-anonymous-struct - we don't care