diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-13 01:47:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-13 01:47:45 +0000 |
commit | 00a4a85d2bf78393a8615e8b94c4473dc2a0b2fa (patch) | |
tree | 27bca2a0078926b54b9ec2bba63bcd8a57eeee85 /clang/lib/Basic/Targets.cpp | |
parent | 759d960ce45d5713a05d8aca02bab4900173ab7c (diff) | |
download | bcm5719-llvm-00a4a85d2bf78393a8615e8b94c4473dc2a0b2fa.tar.gz bcm5719-llvm-00a4a85d2bf78393a8615e8b94c4473dc2a0b2fa.zip |
PR22208: On FreeBSD systems, __STDC_MB_MIGHT_NEQ_WC__ is expected to be defined
even though every basic source character literal has the same numerical value
as a narrow or wide character literal.
It appears that the FreeBSD folks are trying to use this macro to mean
something other than what the relevant standards say it means, but their usage
is conforming, so put up with it.
llvm-svn: 225751
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index dbb7fb7b3fb..4c64a02b5b8 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -273,6 +273,12 @@ protected: // On FreeBSD, wchar_t contains the number of the code point as // used by the character set of the locale. These character sets are // not necessarily a superset of ASCII. + // + // FIXME: This is wrong; the macro refers to the numerical values + // of wchar_t *literals*, which are not locale-dependent. However, + // FreeBSD systems apparently depend on us getting this wrong, and + // setting this to 1 is conforming even if all the basic source + // character literals have the same encoding as char and wchar_t. Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1"); } public: |