Author: alp
Date: Fri Jan 17 10:17:24 2014
New Revision: 199500

URL: http://llvm.org/viewvc/llvm-project?rev=199500&view=rev
Log:
Adjust build fix from r199494 to use C++ casts

Change suggested by Joerg Sonnenberger!

Modified:
    libcxx/trunk/src/stdexcept.cpp

Modified: libcxx/trunk/src/stdexcept.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/stdexcept.cpp?rev=199500&r1=199499&r2=199500&view=diff
==============================================================================
--- libcxx/trunk/src/stdexcept.cpp (original)
+++ libcxx/trunk/src/stdexcept.cpp Fri Jan 17 10:17:24 2014
@@ -79,7 +79,7 @@ __libcpp_nmstr::operator=(const __libcpp
     const char* p = str_;
     str_ = s.str_;
     __sync_add_and_fetch(&count(), 1);
-    if (__sync_add_and_fetch((count_t*)(p-sizeof(count_t)), count_t(-1)) < 0)
+    if 
(__sync_add_and_fetch(reinterpret_cast<count_t*>(const_cast<char*>(p)-sizeof(count_t)),
 count_t(-1)) < 0)
         delete [] (p-offset);
     return *this;
 }


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to