From 763c080fa46b01ac07603792c1d52659e246dd13 Mon Sep 17 00:00:00 2001 From: Man Cao Date: Fri, 7 Oct 2022 23:50:17 +0000 Subject: [PATCH] 8290900: Build failure with Clang 14+ due to function warning attribute Backport-of: 0599a05f8c7e26d4acae0b2cc805a65bdd6c6f67 --- src/hotspot/share/utilities/compilerWarnings_gcc.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/utilities/compilerWarnings_gcc.hpp b/src/hotspot/share/utilities/compilerWarnings_gcc.hpp index 83ec0e0f12f..8cf0ad571f0 100644 --- a/src/hotspot/share/utilities/compilerWarnings_gcc.hpp +++ b/src/hotspot/share/utilities/compilerWarnings_gcc.hpp @@ -69,7 +69,10 @@ #endif // clang/gcc version check -#if (__GNUC__ >= 10) || (defined(__clang_major__) && (__clang_major__ >= 14)) +#if (__GNUC__ >= 10) +// TODO: Re-enable warning attribute for Clang once +// https://github.com/llvm/llvm-project/issues/56519 is fixed and released. +// || (defined(__clang_major__) && (__clang_major__ >= 14)) // Use "warning" attribute to detect uses of "forbidden" functions. // @@ -92,6 +95,6 @@ __VA_ARGS__ \ PRAGMA_DIAG_POP -#endif // gcc10+ or clang14+ +#endif // gcc10+ #endif // SHARE_UTILITIES_COMPILERWARNINGS_GCC_HPP