diff options
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r-- | include/gtest/internal/gtest-port.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 1b2d2de..66cfe46 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -335,24 +335,19 @@ #define GTEST_HAS_RTTI 0 #endif -#elif defined(__GNUC__) - // Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. -#if GTEST_GCC_VER_ >= 40302 +#elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302) + #ifdef __GXX_RTTI #define GTEST_HAS_RTTI 1 #else #define GTEST_HAS_RTTI 0 #endif // __GXX_RTTI -#else -// For gcc versions smaller than 4.3.2, we assume RTTI is enabled. -#define GTEST_HAS_RTTI 1 -#endif // GTEST_GCC_VER >= 40302 -#elif defined(__IBMCPP__) +// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if +// both the typeid and dynamic_cast features are present. +#elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) -// IBM Visual Age defines __RTTI_ALL__ to 1 if both the typeid and -// dynamic_cast features are present. #ifdef __RTTI_ALL__ #define GTEST_HAS_RTTI 1 #else @@ -361,7 +356,7 @@ #else -// Unknown compiler - assume RTTI is enabled. +// For all other compilers, we assume RTTI is enabled. #define GTEST_HAS_RTTI 1 #endif // _MSC_VER |