diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 57654514eb64b..3e948ee6d124b 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -572,8 +572,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then # The -utf-8 option sets source and execution character sets to UTF-8 to enable correct # compilation of all source files regardless of the active code page on Windows. - TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -permissive- -utf-8 -MP" - TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -permissive- -utf-8 -Zc:wchar_t-" + TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -MP" + TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -Zc:wchar_t-" fi # CFLAGS C language level for JDK sources (hotspot only uses C++) diff --git a/src/java.desktop/windows/native/libawt/windows/awt_new.cpp b/src/java.desktop/windows/native/libawt/windows/awt_new.cpp index e9cdd95fbb4c6..fdd1d79ba2c90 100644 --- a/src/java.desktop/windows/native/libawt/windows/awt_new.cpp +++ b/src/java.desktop/windows/native/libawt/windows/awt_new.cpp @@ -114,17 +114,6 @@ void *safe_Realloc(void *memblock, size_t size) { return ptr; } -#if !defined(DEBUG) -// This function exists because VC++ 5.0 currently does not conform to the -// Standard C++ specification which requires that operator new throw -// std::bad_alloc in an out of memory situation. Instead, VC++ 5.0 returns 0. -// -// This function can be safely removed when the problem is corrected. -void * operator new(size_t size) { - return safe_Malloc(size); -} -#endif - // This function is called at the beginning of an entry point. // Entry points are functions which are declared: // 1. CALLBACK,