[Openmp-commits] [PATCH] D131477: [openmp] Fix enumeration build issue for openmp library
Ron Lieberman via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 9 03:03:32 PDT 2022
ronlieb created this revision.
ronlieb added reviewers: sylvestre.ledru, JonChesterfield, jhuber6, shafik.
ronlieb added a project: OpenMP.
Herald added subscribers: guansong, yaxunl, mgorny.
Herald added a project: All.
ronlieb requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
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/
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131477
Files:
openmp/cmake/HandleOpenMPOptions.cmake
openmp/cmake/config-ix.cmake
Index: openmp/cmake/config-ix.cmake
===================================================================
--- openmp/cmake/config-ix.cmake
+++ openmp/cmake/config-ix.cmake
@@ -26,6 +26,7 @@
check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG)
# Warnings that we want to disable because they are too verbose or fragile.
+check_cxx_compiler_flag(-Wno-enum-constexpr-conversion OPENMP_HAVE_WNO_ENUM_CONSTEXPR_CONVERSION_FLAG)
check_cxx_compiler_flag(-Wno-extra OPENMP_HAVE_WNO_EXTRA_FLAG)
check_cxx_compiler_flag(-Wno-pedantic OPENMP_HAVE_WNO_PEDANTIC_FLAG)
check_cxx_compiler_flag(-Wno-maybe-uninitialized OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG)
Index: openmp/cmake/HandleOpenMPOptions.cmake
===================================================================
--- openmp/cmake/HandleOpenMPOptions.cmake
+++ openmp/cmake/HandleOpenMPOptions.cmake
@@ -25,6 +25,7 @@
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.
+append_if(OPENMP_HAVE_WNO_ENUM_CONSTEXPR_CONVERSION_FLAG "-Wno-enum-constexpr-conversion" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WNO_EXTRA_FLAG "-Wno-extra" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WNO_PEDANTIC_FLAG "-Wno-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG "-Wno-maybe-uninitialized" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131477.451080.patch
Type: text/x-patch
Size: 1458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220809/a25260f8/attachment.bin>
More information about the Openmp-commits
mailing list