mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-22 16:26:05 +00:00
8301308: Remove version conditionalization for gcc/clang PRAGMA_DIAG_PUSH/POP
Reviewed-by: kbarrett, dholmes
This commit is contained in:
parent
e3777b0c49
commit
3d77e217b2
@ -36,6 +36,9 @@
|
||||
|
||||
#define PRAGMA_DISABLE_GCC_WARNING(optstring) _Pragma(STR(GCC diagnostic ignored optstring))
|
||||
|
||||
#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
|
||||
#define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop")
|
||||
|
||||
#define PRAGMA_FORMAT_NONLITERAL_IGNORED \
|
||||
PRAGMA_DISABLE_GCC_WARNING("-Wformat-nonliteral") \
|
||||
PRAGMA_DISABLE_GCC_WARNING("-Wformat-security")
|
||||
@ -56,16 +59,6 @@
|
||||
|
||||
#define PRAGMA_NONNULL_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wnonnull")
|
||||
|
||||
#if defined(__clang_major__) && \
|
||||
(__clang_major__ >= 4 || \
|
||||
(__clang_major__ >= 3 && __clang_minor__ >= 1)) || \
|
||||
((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
|
||||
// Tested to work with clang version 3.1 and better.
|
||||
#define PRAGMA_DIAG_PUSH _Pragma("GCC diagnostic push")
|
||||
#define PRAGMA_DIAG_POP _Pragma("GCC diagnostic pop")
|
||||
|
||||
#endif // clang/gcc version check
|
||||
|
||||
#if (__GNUC__ >= 10)
|
||||
// TODO: Re-enable warning attribute for Clang once
|
||||
// https://github.com/llvm/llvm-project/issues/56519 is fixed and released.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user