Add -Wzero-as-null-pointer-constant for gcc

This commit is contained in:
Azat Khuzhin 2020-10-10 22:44:06 +03:00
parent 705abef402
commit 0813c1073b

View File

@ -170,6 +170,8 @@ elseif (COMPILER_GCC)
add_cxx_compile_options(-Wunused)
# Warn if vector operation is not implemented via SIMD capabilities of the architecture
add_cxx_compile_options(-Wvector-operation-performance)
# Warn when a literal 0 is used as null pointer constant.
add_cxx_compile_options(-Wzero-as-null-pointer-constant)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
# XXX: gcc10 stuck with this option while compiling GatherUtils code