[PATCH] Use __atomic_exchange_n with GCC instead of Clang's __sync_swap

Reid Kleckner rnk at google.com
Fri Oct 3 12:54:39 PDT 2014


================
Comment at: src/cxa_handlers.cpp:105
@@ -104,3 +104,3 @@
 
-extern "C" new_handler __cxa_new_handler = 0;
+new_handler __cxa_new_handler = 0;
 // In the future these will become:
----------------
majnemer wrote:
> Why is the extern "C" removed from here? Looks unrelated.
I forgot to mention in the description that this was also necessary to silence this warning:
../projects/libcxxabi/src/cxa_handlers.cpp:105:24: warning: ‘__cxa_new_handler’ initialized and declared ‘extern’
 extern "C" new_handler __cxa_new_handler = 0;

http://reviews.llvm.org/D5604






More information about the cfe-commits mailing list