Skip to content

Commit 9ff0cc7

Browse files
committed
[openmp] Fix enumeration build issue for openmp library
integer value 40962 is outside the valid range of values [0, 31] for this enumeration type [-Wenum-constexpr-conversion]` (Issue #57022) turn on -Wno-enum-constexpr-conversion to buy some time to fix the more egregious issue in hsa_agent_into_t and hsa_amd_agent_info_t interfaces. relates to https://reviews.llvm.org/D131307/new/ Differential Revision: https://reviews.llvm.org/D131477
1 parent fc4c1a8 commit 9ff0cc7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

openmp/cmake/HandleOpenMPOptions.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ append_if(OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG "-Wimplicit-fallthrough" CMAKE_
2525
append_if(OPENMP_HAVE_WSIGN_COMPARE_FLAG "-Wsign-compare" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
2626

2727
# Warnings that we want to disable because they are too verbose or fragile.
28+
append_if(OPENMP_HAVE_WNO_ENUM_CONSTEXPR_CONVERSION_FLAG "-Wno-enum-constexpr-conversion" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
2829
append_if(OPENMP_HAVE_WNO_EXTRA_FLAG "-Wno-extra" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
2930
append_if(OPENMP_HAVE_WNO_PEDANTIC_FLAG "-Wno-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
3031
append_if(OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG "-Wno-maybe-uninitialized" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)

openmp/cmake/config-ix.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH
2626
check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG)
2727

2828
# Warnings that we want to disable because they are too verbose or fragile.
29+
check_cxx_compiler_flag(-Wno-enum-constexpr-conversion OPENMP_HAVE_WNO_ENUM_CONSTEXPR_CONVERSION_FLAG)
2930
check_cxx_compiler_flag(-Wno-extra OPENMP_HAVE_WNO_EXTRA_FLAG)
3031
check_cxx_compiler_flag(-Wno-pedantic OPENMP_HAVE_WNO_PEDANTIC_FLAG)
3132
check_cxx_compiler_flag(-Wno-maybe-uninitialized OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG)

0 commit comments

Comments
 (0)