Meta: Disable -Warray-bounds and -Wstringop-overflow on GCC

These generate what seems to be nonsense warnings on Function and
ByteBuffer; they *should* be investigated at some point, but they don't
provide anything useful at this point.
This commit is contained in:
Ali Mohammad Pur 2025-04-06 20:48:12 +02:00 committed by Ali Mohammad Pur
parent 0a958c8e16
commit 6b883c5ccb

View File

@ -108,6 +108,11 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_cxx_compile_options(-Wno-unqualified-std-cast-call)
add_cxx_compile_options(-Wvla)
# FIXME: These warnings trigger on Function and ByteBuffer in GCC (only when LTO is disabled...)
# investigate this and maybe reenable them if they're not false positives/invalid.
add_cxx_compile_options(-Wno-array-bounds)
add_cxx_compile_options(-Wno-stringop-overflow)
# FIXME: This warning seems useful but has too many false positives with GCC 13.
add_cxx_compile_options(-Wno-dangling-reference)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$" AND CMAKE_CXX_SIMULATE_ID MATCHES "MSVC")