Skip to content

Commit

Permalink
BUILD: Disable -Wtautological-unsigned-enum-zero-compare
Browse files Browse the repository at this point in the history
Whether an enum is signed or unsigned is implementation defined, so
this warning doesn't make any sense for us.
  • Loading branch information
DrMcCoy committed Aug 26, 2020
1 parent 07fa32d commit b25ae17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")

# Disable warnings about unused static const variables
set_check_compiler_flag_cxx("-Wunused-const-variable" "-Wno-unused-const-variable")

# Disable warnings about >= 0 comparisons on enums
set_check_compiler_flag_cxx("-Wtautological-unsigned-enum-zero-compare" "-Wno-tautological-unsigned-enum-zero-compare")
endif()

# platform specific warning settings
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ AX_CHECK_COMPILER_FLAGS_VAR([C++], [WARN], [-Winconsistent-missing-override], [-
dnl Disable warnings about unused static const variables
AX_CHECK_COMPILER_FLAGS_VAR([C++], [WARN], [-Wunused-const-variable], [-Wno-unused-const-variable])

dnl Disable warnings about >= 0 comparisons on enums
AX_CHECK_COMPILER_FLAGS_VAR([C++], [WARN], [-Wtautological-unsigned-enum-zero-compare], [-Wno-tautological-unsigned-enum-zero-compare])

AC_SUBST(WARN)

dnl C++ dialect
Expand Down

0 comments on commit b25ae17

Please sign in to comment.