googletest: pick from upstream: Don't allow signed/unsigned wchar_t in gcc 9 and later

Pick 711fccf8317b4fb7adc21c00fc1e20823c5d875f from upstream googletest:

    Don't allow signed/unsigned wchar_t in gcc 9 and later

Upstream pull request:	https://github.com/google/googletest/pull/2270

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Ryan Libby 2019-12-21 02:44:50 +00:00
parent 79457a8ad1
commit f157ca4696
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355976

View File

@ -125,8 +125,11 @@ struct LinkedPtrLessThan {
//
// To gcc,
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
//
// gcc-9 appears to treat signed/unsigned wchar_t as ill-formed
// regardless of the signage of its underlying type.
#ifdef __GNUC__
#if !defined(__WCHAR_UNSIGNED__)
#if !defined(__WCHAR_UNSIGNED__) && (__GNUC__ < 9)
// signed/unsigned wchar_t are valid types.
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
#endif