< prev index next >
src/hotspot/share/utilities/compilerWarnings_gcc.hpp
Print this page
@@ -48,10 +48,16 @@
PRAGMA_DISABLE_GCC_WARNING("-Wformat-nonliteral") \
PRAGMA_DISABLE_GCC_WARNING("-Wformat-security")
#define PRAGMA_FORMAT_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wformat")
+// Disable -Wstringop-truncation which is introduced in GCC 8.
+// https://gcc.gnu.org/gcc-8/changes.html
+#if !defined(__clang_major__) && (__GNUC__ >= 8)
+#define PRAGMA_STRINGOP_TRUNCATION_IGNORED PRAGMA_DISABLE_GCC_WARNING("-Wstringop-truncation")
+#endif
+
#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.
< prev index next >