mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-19 23:05:28 +00:00
8288048: Build failure with GCC 6 after JDK-8286562
Reviewed-by: kbarrett, ysuenaga
This commit is contained in:
parent
db4405d0f8
commit
59b0de6bc7
@ -138,7 +138,7 @@ inline void JfrTraceIdBits::store(jbyte bits, const T* ptr) {
|
||||
// goes away with minor code perturbations, such as replacing function calls
|
||||
// with equivalent code directly inlined.
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_DISABLE_GCC_WARNING("-Wstringop-overflow")
|
||||
PRAGMA_STRINGOP_OVERFLOW_IGNORED
|
||||
set(bits, traceid_tag_byte(ptr));
|
||||
PRAGMA_DIAG_POP
|
||||
}
|
||||
|
||||
@ -66,6 +66,10 @@
|
||||
#define PRAGMA_STRINGOP_TRUNCATION_IGNORED
|
||||
#endif
|
||||
|
||||
#ifndef PRAGMA_STRINGOP_OVERFLOW_IGNORED
|
||||
#define PRAGMA_STRINGOP_OVERFLOW_IGNORED
|
||||
#endif
|
||||
|
||||
#ifndef PRAGMA_NONNULL_IGNORED
|
||||
#define PRAGMA_NONNULL_IGNORED
|
||||
#endif
|
||||
|
||||
@ -50,6 +50,12 @@
|
||||
#define PRAGMA_STRINGOP_TRUNCATION_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wstringop-truncation")
|
||||
#endif
|
||||
|
||||
// Disable -Wstringop-overflow which is introduced in GCC 7.
|
||||
// https://gcc.gnu.org/gcc-7/changes.html
|
||||
#if !defined(__clang_major__) && (__GNUC__ >= 7)
|
||||
#define PRAGMA_STRINGOP_OVERFLOW_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wstringop-overflow")
|
||||
#endif
|
||||
|
||||
#define PRAGMA_NONNULL_IGNORED \
|
||||
PRAGMA_DISABLE_GCC_WARNING("-Wnonnull")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user