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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199494 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98760c18f8
commit
5f58b89ecd
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user