diff options
author | Thomas Anderson <thomasanderson@google.com> | 2019-06-13 22:27:24 +0000 |
---|---|---|
committer | Thomas Anderson <thomasanderson@google.com> | 2019-06-13 22:27:24 +0000 |
commit | 2ce370c957296b8a9bbde0d0bae98b9f85f3e36e (patch) | |
tree | bc23e86a4c8e8959c7cd6c6be555b0c800eb8461 | |
parent | 4336a9496d4c811abf65ce109f366907552a528d (diff) | |
download | bcm5719-llvm-2ce370c957296b8a9bbde0d0bae98b9f85f3e36e.tar.gz bcm5719-llvm-2ce370c957296b8a9bbde0d0bae98b9f85f3e36e.zip |
[libc++] Fix build with gcc 4.8
gcc 4.8.4 (but not 5.4.0 or 7.3.0) has trouble initializing errc with {}, giving
the error in [1]. This CL switches to explicitly using errc(0), which gcc 4.8
accepts.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=973723
Differential Revision: https://reviews.llvm.org/D63296
llvm-svn: 363333
-rw-r--r-- | libcxx/include/charconv | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/charconv b/libcxx/include/charconv index 4e84ef68523..a644fe09484 100644 --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -314,7 +314,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type) #if !defined(_LIBCPP_COMPILER_MSVC) if (__tx::digits <= __diff || __tx::__width(__value) <= __diff) - return {__tx::__convert(__value, __first), {}}; + return {__tx::__convert(__value, __first), errc(0)}; else return {__last, errc::value_too_large}; #else |