diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 51dfda2a..729e91a5 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -119,12 +119,7 @@ macro(config_compiler_and_linker) set(cxx_no_rtti_flags "-fno-rtti") set(cxx_strict_flags "-Wextra -Wno-unused-parameter -Wno-missing-field-initializers") - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - set(cxx_exception_flags "-features=except") - # Sun Pro doesn't provide macros to indicate whether exceptions and - # RTTI are enabled, so we define GTEST_HAS_* explicitly. - set(cxx_no_exception_flags "-features=no%except -DGTEST_HAS_EXCEPTIONS=0") - set(cxx_no_rtti_flags "-features=no%rtti -DGTEST_HAS_RTTI=0") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR CMAKE_CXX_COMPILER_ID STREQUAL "XL") # CMake 2.8 changes Visual Age's compiler ID to "XL". diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 5d35f672..690f2d36 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -473,11 +473,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; #elif defined(__GNUC__) && defined(__EXCEPTIONS) && __EXCEPTIONS // gcc defines __EXCEPTIONS to 1 if and only if exceptions are enabled. #define GTEST_HAS_EXCEPTIONS 1 -#elif defined(__SUNPRO_CC) -// Sun Pro CC supports exceptions. However, there is no compile-time way of -// detecting whether they are enabled or not. Therefore, we assume that -// they are enabled unless the user tells us otherwise. -#define GTEST_HAS_EXCEPTIONS 1 #elif defined(__IBMCPP__) && defined(__EXCEPTIONS) && __EXCEPTIONS // xlC defines __EXCEPTIONS to 1 if and only if exceptions are enabled. #define GTEST_HAS_EXCEPTIONS 1 @@ -740,8 +735,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // Typed tests need and variadic macros, which GCC, VC++ 8.0, // Sun Pro CC, IBM Visual Age, and HP aCC support. -#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \ - defined(__IBMCPP__) +#if defined(__GNUC__) || defined(_MSC_VER) || defined(__IBMCPP__) #define GTEST_HAS_TYPED_TEST 1 #define GTEST_HAS_TYPED_TEST_P 1 #endif @@ -2252,7 +2246,7 @@ inline const char* GetEnv(const char* name) { // We are on an embedded platform, which has no environment variables. static_cast(name); // To prevent 'unused argument' warning. return nullptr; -#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) +#elif defined(__BORLANDC__) // Environment variables which we programmatically clear will be set to the // empty string rather than unset (NULL). Handle that case. const char* const env = getenv(name); diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 6f37c536..b95a5471 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -1712,7 +1712,7 @@ static void SetEnv(const char* name, const char* value) { #ifdef GTEST_OS_WINDOWS_MOBILE // Environment variables are not supported on Windows CE. return; -#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) +#elif defined(__BORLANDC__) // C++Builder's putenv only stores a pointer to its parameter; we have to // ensure that the string remains valid as long as it might be needed. // We use an std::map to do so. @@ -4010,9 +4010,6 @@ TEST(AssertionTest, NamedEnum) { EXPECT_NONFATAL_FAILURE(EXPECT_EQ(kE1, kE2), "Which is: 1"); } -// Sun Studio rejects this code. -#if !defined(__SUNPRO_CC) - // Tests using assertions with anonymous enums. enum { kCaseA = -1, @@ -4072,8 +4069,6 @@ TEST(AssertionTest, AnonymousEnum) { EXPECT_FATAL_FAILURE(ASSERT_EQ(kCaseA, kCaseC), "\n Which is: -1"); } -#endif // !defined(__SUNPRO_CC) - #ifdef GTEST_OS_WINDOWS static HRESULT UnexpectedHRESULTFailure() { return E_UNEXPECTED; }