Now I believe this compiles with gcc 4.8, 4.9, 5.0, 6.0, 7.0.
--- a/make/hotspot/lib/CompileJvm.gmk Mon Mar 05 22:35:54 2018 +0100
+++ b/make/hotspot/lib/CompileJvm.gmk Mon Mar 05 22:45:57 2018 +0100
@@ -228,7 +228,9 @@
delete-non-virtual-dtor ignored-qualifiers parentheses reorder \
unused-local-typedefs unused-variable address \
missing-field-initializers unused-but-set-variable char-subscripts \
- array-bounds narrowing empty-body unused-but-set-parameter, \
+ array-bounds narrowing empty-body unused-but-set-parameter \
+ maybe-uninitialized logical-op \
+ implicit-fallthrough expansion-to-defined, \
DISABLED_WARNINGS_clang := tautological-compare, \
DISABLED_WARNINGS_solstudio := hidef inlafteruse \
unknownpragma w_enumnotused \
--- a/make/lib/Lib-java.security.jgss.gmk Mon Mar 05 22:35:54 2018 +0100
+++ b/make/lib/Lib-java.security.jgss.gmk Mon Mar 05 22:45:57 2018 +0100
@@ -40,6 +40,7 @@
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
+ DISABLED_WARNINGS_gcc := logical-op, \
MAPFILE := $(TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/make/lib/NetworkingLibraries.gmk Mon Mar 05 22:35:54 2018 +0100
+++ b/make/lib/NetworkingLibraries.gmk Mon Mar 05 22:45:57 2018 +0100
@@ -32,7 +32,7 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \
- DISABLED_WARNINGS_gcc := format-nonliteral, \
+ DISABLED_WARNINGS_gcc := format-nonliteral logical-op, \
DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \
DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
DISABLED_WARNINGS_solstudio := E_ARG_INCOMPATIBLE_WITH_ARG_L, \