8232770: Enable more warnings on solaris studio

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2019-10-23 09:48:46 +02:00
parent 29e2c16e5b
commit 21585ebcdf
8 changed files with 13 additions and 16 deletions

View File

@ -170,11 +170,11 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
DISABLE_WARNING_PREFIX="-erroff="
CFLAGS_WARNINGS_ARE_ERRORS="-errwarn=%all"
WARNINGS_ENABLE_ALL_CFLAGS="-v"
WARNINGS_ENABLE_ALL_CXXFLAGS="+w"
WARNINGS_ENABLE_ALL_CFLAGS="-v -fd -xtransition"
WARNINGS_ENABLE_ALL_CXXFLAGS="+w +w2"
DISABLED_WARNINGS_C=""
DISABLED_WARNINGS_CXX=""
DISABLED_WARNINGS_C="E_OLD_STYLE_FUNC_DECL E_OLD_STYLE_FUNC_DEF E_SEMANTICS_OF_OP_CHG_IN_ANSI_C E_NO_REPLACEMENT_IN_STRING E_DECLARATION_IN_CODE"
DISABLED_WARNINGS_CXX="inllargeuse inllargeint notused wemptydecl notemsource"
;;
gcc)

View File

@ -98,7 +98,7 @@ define SetupTestFilesCompilationBody
DISABLED_WARNINGS_gcc := format undef unused-function unused-value, \
DISABLED_WARNINGS_clang := undef format-nonliteral \
missing-field-initializers sometimes-uninitialized, \
DISABLED_WARNINGS_CXX_solstudio := wvarhidenmem, \
DISABLED_WARNINGS_CXX_solstudio := wvarhidenmem doubunder, \
LIBS := $$($1_LIBS_$$(name)), \
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \

View File

@ -75,7 +75,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
DEBUG_SYMBOLS := false, \
DISABLED_WARNINGS_clang := tautological-compare, \
DISABLED_WARNINGS_solstudio := notemsource, \
DEFINE_THIS_FILE := false, \
))

View File

@ -87,6 +87,7 @@ $(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
DISABLED_WARNINGS_clang := format-nonliteral, \
DISABLED_WARNINGS_solstudio := wunreachable, \
LDFLAGS := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \

View File

@ -229,7 +229,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
format-nonliteral parentheses unused-value unused-function, \
DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer \
sign-compare format-nonliteral, \
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
DISABLED_WARNINGS_microsoft := 4244 4267 4996, \
ASFLAGS := $(LIBAWT_ASFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
@ -339,8 +338,8 @@ ifeq ($(call isTargetOs, windows macosx), false)
implicit-fallthrough undef unused-function, \
DISABLED_WARNINGS_clang := parentheses format undef \
logical-op-parentheses format-nonliteral int-conversion, \
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
DISABLED_WARNINGS_solstudio := E_ASSIGNMENT_TYPE_MISMATCH \
E_NON_CONST_INIT, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \
@ -620,7 +619,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
E_ENUM_VAL_OVERFLOWS_INT_MAX, \
DISABLED_WARNINGS_CXX_solstudio := \
truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \
hidevf w_novirtualdescr arrowrtn2 refmemnoconstr_aggr unknownpragma, \
hidevf w_novirtualdescr arrowrtn2 refmemnoconstr_aggr unknownpragma \
doubunder wunreachable, \
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101 4068 4805 4138, \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
@ -848,8 +848,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
maybe-uninitialized shift-negative-value implicit-fallthrough \
unused-function, \
DISABLED_WARNINGS_clang := incompatible-pointer-types sign-compare, \
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
E_STATEMENT_NOT_REACHED, \
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

View File

@ -212,9 +212,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := unused-function, \
DISABLED_WARNINGS_clang := sometimes-uninitialized format-nonliteral, \
DISABLED_WARNINGS_solstudio := \
E_ASM_DISABLES_OPTIMIZATION \
E_STATEMENT_NOT_REACHED, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBZ_LIBS), \

View File

@ -61,7 +61,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
DISABLED_WARNINGS_microsoft := 4267, \
DISABLED_WARNINGS_gcc := sign-compare pointer-arith, \
DISABLED_WARNINGS_clang := sign-compare pointer-arith format-nonliteral, \
DISABLED_WARNINGS_CXX_solstudio := truncwarn unknownpragma, \
DISABLED_WARNINGS_CXX_solstudio := truncwarn unknownpragma doubunder, \
CFLAGS := $(CFLAGS_JDKLIB) $(SA_CFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(SA_CFLAGS) $(SA_CXXFLAGS), \
EXTRA_SRC := $(LIBSA_EXTRA_SRC), \

View File

@ -38,6 +38,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBUNPACK, \
EXTRA_HEADER_DIRS := $(call GetJavaHeaderDir, java.base), \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
DISABLED_WARNINGS_clang := format-nonliteral, \
DISABLED_WARNINGS_solstudio := wunreachable, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \