googletest
googletest copied to clipboard
Fix warning which complain macro not defined
internal/gtest-port.h:437:29: warning: "__EXCEPTIONS" is not defined, evaluates to 0 [-Wundef] internal/gtest-port.h:2132:5: warning: "_MSC_VER" is not defined, evaluates to 0 [-Wundef]
Signed-off-by: litong12 [email protected]
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
This doesn't build:
googletest/src/gtest.cc:113:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if GTEST_HAS_EXCEPTIONS
^
googletest/include/gtest/internal/gtest-port.h:430:4: note: expanded from macro 'GTEST_HAS_EXCEPTIONS'
(defined(__EXCEPTIONS) && __has_feature(cxx_exceptions))
This doesn't build:
googletest/src/gtest.cc:113:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] #if GTEST_HAS_EXCEPTIONS ^ googletest/include/gtest/internal/gtest-port.h:430:4: note: expanded from macro 'GTEST_HAS_EXCEPTIONS' (defined(__EXCEPTIONS) && __has_feature(cxx_exceptions))
Fixed.