mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-28 15:51:02 +00:00
8248548: Use DISABLED_WARNINGS for globally disabled warnings on Visual Studio in Hotspot
Reviewed-by: kbarrett, erikj
This commit is contained in:
parent
f19db799f3
commit
2de3595895
@ -106,6 +106,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
||||
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
|
||||
undef switch format-nonliteral tautological-undefined-compare \
|
||||
self-assign-overloaded, \
|
||||
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
|
||||
LDFLAGS := $(JVM_LDFLAGS), \
|
||||
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/libgtest, \
|
||||
LIBS := $(JVM_LIBS), \
|
||||
|
||||
@ -95,9 +95,7 @@ DISABLED_WARNINGS_clang := tautological-compare \
|
||||
|
||||
DISABLED_WARNINGS_xlc := tautological-compare shift-negative-value
|
||||
|
||||
DISABLED_WARNINGS_microsoft :=
|
||||
|
||||
|
||||
DISABLED_WARNINGS_microsoft := 4100 4127 4201 4244 4291 4351 4511 4512 4514 4996
|
||||
|
||||
################################################################################
|
||||
# Platform specific setup
|
||||
|
||||
@ -111,7 +111,6 @@ inline int g_isfinite(jdouble f) { return _finite(f); }
|
||||
// Miscellaneous
|
||||
|
||||
// Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead
|
||||
#if _MSC_VER >= 1400
|
||||
#define open _open
|
||||
#define close _close
|
||||
#define read _read
|
||||
@ -119,34 +118,11 @@ inline int g_isfinite(jdouble f) { return _finite(f); }
|
||||
#define lseek _lseek
|
||||
#define unlink _unlink
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
// Visual Studio 2013 introduced strtoull(); before, one has to use _strtoui64() instead.
|
||||
#define strtoull _strtoui64
|
||||
// Visual Studio prior to 2013 had no va_copy, but could safely copy va_list by assignement
|
||||
#define va_copy(dest, src) dest = src
|
||||
// Fixes some wrong warnings about 'this' : used in base member initializer list
|
||||
#pragma warning( disable : 4355 )
|
||||
#endif
|
||||
|
||||
|
||||
#pragma warning( disable : 4100 ) // unreferenced formal parameter
|
||||
#pragma warning( disable : 4127 ) // conditional expression is constant
|
||||
#pragma warning( disable : 4514 ) // unreferenced inline function has been removed
|
||||
#pragma warning( disable : 4244 ) // possible loss of data
|
||||
#pragma warning( disable : 4512 ) // assignment operator could not be generated
|
||||
#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h)
|
||||
#pragma warning( disable : 4511 ) // copy constructor could not be generated
|
||||
#pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception
|
||||
#pragma warning( disable : 4351 ) // new behavior: elements of array ... will be default initialized
|
||||
#ifdef CHECK_UNHANDLED_OOPS
|
||||
#pragma warning( disable : 4521 ) // class has multiple copy ctors of a single type
|
||||
#pragma warning( disable : 4522 ) // class has multiple assignment operators of a single type
|
||||
#endif // CHECK_UNHANDLED_OOPS
|
||||
#if _MSC_VER >= 1400
|
||||
#pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE
|
||||
#endif
|
||||
|
||||
// Formatting.
|
||||
#define FORMAT64_MODIFIER "I64"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user