From 3eae253b1ac2da31d8928950dcb50956b64e81d1 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 15 Aug 2019 13:26:55 +0000 Subject: [OpenMP] Enable warning about "implicit fallthrough" Fix last warned location in ittnotify_static.cpp using the defined macro KMP_FALLTHROUGH(). Differential Revision: https://reviews.llvm.org/D65871 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@369003 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/HandleOpenMPOptions.cmake | 1 + cmake/config-ix.cmake | 1 + 2 files changed, 2 insertions(+) (limited to 'cmake') diff --git a/cmake/HandleOpenMPOptions.cmake b/cmake/HandleOpenMPOptions.cmake index 3ed046c..eb7b286 100644 --- a/cmake/HandleOpenMPOptions.cmake +++ b/cmake/HandleOpenMPOptions.cmake @@ -21,6 +21,7 @@ endif() # Additional warnings that are not enabled by -Wall. append_if(OPENMP_HAVE_WCAST_QUAL_FLAG "-Wcast-qual" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) append_if(OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG "-Wformat-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) +append_if(OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG "-Wimplicit-fallthrough" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) append_if(OPENMP_HAVE_WSIGN_COMPARE_FLAG "-Wsign-compare" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) # Warnings that we want to disable because they are too verbose or fragile. diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 8858bc6..ebb2530 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -6,6 +6,7 @@ check_cxx_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG) # Additional warnings that are not enabled by -Wall. check_cxx_compiler_flag(-Wcast-qual OPENMP_HAVE_WCAST_QUAL_FLAG) check_cxx_compiler_flag(-Wformat-pedantic OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG) +check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG) check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG) # Warnings that we want to disable because they are too verbose or fragile. -- cgit v1.2.3