Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8248548: Use DISABLED_WARNINGS for globally disabled warnings on Visu…
…al Studio in Hotspot

Reviewed-by: kbarrett, erikj
  • Loading branch information
magicus committed Jun 30, 2020
1 parent f19db79 commit 2de3595895fef356b351a260cffa81ddf5b8de03
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
@@ -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,42 +111,18 @@ 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
#define write _write
#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"

0 comments on commit 2de3595

Please sign in to comment.