changeset 49127:2c4d1993b5f9

8196985: Disable new warnings from GCC 7.3 in jdk libraries Reviewed-by: tbell, ihse
author erikj
date Thu, 08 Feb 2018 12:01:32 -0800
parents 46d915180ad2
children bfdb44e56292 002355dce715 bd5711180ed7 54026499db3e ec267b2b975c 10d7863f4064 fbff1521c0bc e43f7d19c92a f8645e716519 0c6ce8fdb50a
files make/launcher/Launcher-jdk.pack.gmk make/lib/Awt2dLibraries.gmk make/lib/CoreLibraries.gmk make/lib/Lib-jdk.crypto.ec.gmk make/lib/Lib-jdk.jdwp.agent.gmk make/lib/Lib-jdk.pack.gmk
diffstat 6 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/make/launcher/Launcher-jdk.pack.gmk	Thu Feb 08 10:54:01 2018 -0800
+++ b/make/launcher/Launcher-jdk.pack.gmk	Thu Feb 08 12:01:32 2018 -0800
@@ -82,7 +82,7 @@
     CFLAGS_linux := -fPIC, \
     CFLAGS_solaris := -KPIC, \
     CFLAGS_macosx := -fPIC, \
-    DISABLED_WARNINGS_gcc := unused-result, \
+    DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
     MAPFILE := $(UNPACK_MAPFILE),\
     LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
         $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
--- a/make/lib/Awt2dLibraries.gmk	Thu Feb 08 10:54:01 2018 -0800
+++ b/make/lib/Awt2dLibraries.gmk	Thu Feb 08 12:01:32 2018 -0800
@@ -358,7 +358,8 @@
         WARNINGS_AS_ERRORS_xlc := false, \
         DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
             unused-result maybe-uninitialized format \
-            format-security int-to-pointer-cast parentheses, \
+            format-security int-to-pointer-cast parentheses \
+            implicit-fallthrough, \
         DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
             E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
         MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
@@ -491,7 +492,7 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
         $(LIBJAVA_HEADER_FLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
-    DISABLED_WARNINGS_gcc := clobbered, \
+    DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \
     MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -669,7 +670,7 @@
     CFLAGS_windows = -DCC_NOEX, \
     WARNINGS_AS_ERRORS_xlc := false, \
     DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
-        type-limits missing-field-initializers, \
+        type-limits missing-field-initializers implicit-fallthrough, \
     DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
         maybe-uninitialized, \
     DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
@@ -943,7 +944,8 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
           $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
-      DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized shift-negative-value, \
+      DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
+          maybe-uninitialized shift-negative-value implicit-fallthrough, \
       DISABLED_WARNINGS_clang := incompatible-pointer-types, \
       DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
           E_STATEMENT_NOT_REACHED, \
--- a/make/lib/CoreLibraries.gmk	Thu Feb 08 10:54:01 2018 -0800
+++ b/make/lib/CoreLibraries.gmk	Thu Feb 08 12:01:32 2018 -0800
@@ -67,7 +67,7 @@
       CFLAGS_linux_ppc64le := -ffp-contract=off, \
       CFLAGS_linux_s390x := -ffp-contract=off, \
       CFLAGS_linux_aarch64 := -ffp-contract=off, \
-      DISABLED_WARNINGS_gcc := sign-compare, \
+      DISABLED_WARNINGS_gcc := sign-compare misleading-indentation, \
       DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
       ARFLAGS := $(ARFLAGS), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
@@ -113,6 +113,7 @@
     SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
     OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB), \
+    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
     DISABLED_WARNINGS_microsoft := 4244 4267, \
     MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -229,6 +230,7 @@
         -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
         -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
     CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
+    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
     MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
     REORDER := $(BUILD_LIBZIP_REORDER), \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -270,6 +272,7 @@
     EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
     CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
+    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
     CFLAGS_unix := -UDEBUG, \
     MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
@@ -363,6 +366,7 @@
     EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(LIBJLI_CFLAGS), \
+    DISABLED_WARNINGS_gcc := maybe-uninitialized, \
     DISABLED_WARNINGS_solstudio := \
         E_ASM_DISABLES_OPTIMIZATION \
         E_STATEMENT_NOT_REACHED, \
--- a/make/lib/Lib-jdk.crypto.ec.gmk	Thu Feb 08 10:54:01 2018 -0800
+++ b/make/lib/Lib-jdk.crypto.ec.gmk	Thu Feb 08 12:01:32 2018 -0800
@@ -54,7 +54,7 @@
           -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
       CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
           $(BUILD_LIBSUNEC_FLAGS), \
-      DISABLED_WARNINGS_gcc := sign-compare, \
+      DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
       DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
       MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
--- a/make/lib/Lib-jdk.jdwp.agent.gmk	Thu Feb 08 10:54:01 2018 -0800
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk	Thu Feb 08 12:01:32 2018 -0800
@@ -43,6 +43,7 @@
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
         $(LIBDT_SOCKET_CPPFLAGS), \
+    DISABLED_WARNINGS_gcc := shift-negative-value, \
     MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/make/lib/Lib-jdk.pack.gmk	Thu Feb 08 10:54:01 2018 -0800
+++ b/make/lib/Lib-jdk.pack.gmk	Thu Feb 08 12:01:32 2018 -0800
@@ -40,6 +40,7 @@
         -I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
         $(LIBJAVA_HEADER_FLAGS), \
     CFLAGS_release := -DPRODUCT, \
+    DISABLED_WARNINGS_gcc := implicit-fallthrough, \
     MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \