diff options
author | Alp Toker <alp@nuanti.com> | 2014-01-17 14:24:23 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-01-17 14:24:23 +0000 |
commit | 0b438a9f63851d9fbb432d6440d4d6267056512c (patch) | |
tree | 94afec7152a3eee0e4754a5e1f3568a1428495fc /libcxx/src/stdexcept.cpp | |
parent | 9342557ea70c08f50391fc1e8d9df82db21ad2ae (diff) | |
download | llvm-0b438a9f63851d9fbb432d6440d4d6267056512c.zip llvm-0b438a9f63851d9fbb432d6440d4d6267056512c.tar.gz llvm-0b438a9f63851d9fbb432d6440d4d6267056512c.tar.bz2 |
Build fix for gcc builtin
The __sync_add_and_fetch() builtin parameter is volatile but clang has
'different' type checking and ends up accepting this code.
Undo the C++ cast from r198505 to get libc++/LLVM building with g++ while this
is investigated.
llvm-svn: 199494
Diffstat (limited to 'libcxx/src/stdexcept.cpp')
-rw-r--r-- | libcxx/src/stdexcept.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp index 01b66e4..497931c 100644 --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -79,7 +79,7 @@ __libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT const char* p = str_; str_ = s.str_; __sync_add_and_fetch(&count(), 1); - if (__sync_add_and_fetch(reinterpret_cast<const count_t*>(p-sizeof(count_t)), count_t(-1)) < 0) + if (__sync_add_and_fetch((count_t*)(p-sizeof(count_t)), count_t(-1)) < 0) delete [] (p-offset); return *this; } |