<div dir="ltr">Thank you to all for addressing this, I must say that you are very much considered awesome in the eyes of those who use the tools you are creating.<div><br></div><div style>While I can't justly review the code in this patch, I would like to test if the issue I ran into is indeed solved with it, however I ran into difficulties when applyinng the patch to my local git clone (<a href="http://llvm.org/git/libcxx.git">http://llvm.org/git/libcxx.git</a>). Nonetheless, it's pretty clear the problem is understood and thank you again for addressing it. I will continue to test and report any issues I come across.</div>
<div style><br></div><div style>cheers,</div><div style>Rich</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 20, 2013 at 8:55 PM, Howard Hinnant <span dir="ltr"><<a href="mailto:hhinnant@apple.com" target="_blank">hhinnant@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please review:<br>
<br>
I've enclosed a proposed patch for fixing <atomic>. This patch changes us from using _Atomic(T) for the stored type, to just T, but aligned to _Atomic(T). It also switches from the __c11_atomic intrinsics to the gcc __atomic intrinsics. This change exposed several silly bugs in the test suite. But most importantly it is meant to allow std::atomic to be instantiated with trivially copyable class types.<br>
<br>
The enclosed patch passes all (modified) tests on Apple's Mountain Lion except one:<br>
<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics<br>
passed 2 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.fences<br>
passed 11 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.flag<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.general<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.lockfree<br>
passed 2 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.order<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.syn<br>
passed 5 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.generic<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.arith<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.general<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.pointer<br>
Undefined symbols for architecture x86_64:<br>
"___atomic_is_lock_free", referenced from:<br>
void test<A>() in atomic_is_lock_free-cA4Y5d.o<br>
ld: symbol(s) not found for architecture x86_64<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>
/Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp failed to compile<br>
Compile line was: xcrun clang++ -stdlib=libc++ -std=c++11 -I/Users/hhinnant/Development/temp_libcxx/test/support -I/Users/hhinnant/Development/temp_libcxx/include -L/Users/hhinnant/Development/temp_libcxx/lib -D_LIBCPP_STD_VER=13 -I/Users/hhinnant/Development/temp_libcxx/test/support -I/Users/hhinnant/Development/temp_libcxx/include -L/Users/hhinnant/Development/temp_libcxx/lib atomic_is_lock_free.pass.cpp<br>
failed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.req<br>
passed 22 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.req<br>
passed 1 tests in /Users/hhinnant/Development/temp_libcxx/test/atomics/atomics.types.operations/atomics.types.operations.templ<br>
****************************************************<br>
Results for /Users/hhinnant/Development/temp_libcxx/test/atomics:<br>
using Apple LLVM version 4.2 (clang-425.1.16) (based on LLVM 3.2svn)<br>
Target: x86_64-apple-darwin12.3.0<br>
Thread model: posix<br>
with -stdlib=libc++ -std=c++11 -I/Users/hhinnant/Development/temp_libcxx/test/support -I/Users/hhinnant/Development/temp_libcxx/include -L/Users/hhinnant/Development/temp_libcxx/lib -D_LIBCPP_STD_VER=13 -I/Users/hhinnant/Development/temp_libcxx/test/support -I/Users/hhinnant/Development/temp_libcxx/include -L/Users/hhinnant/Development/temp_libcxx/lib<br>
----------------------------------------------------<br>
sections without tests : 0<br>
sections with failures : 1<br>
sections without failures: 13<br>
+ ----<br>
total number of sections : 14<br>
----------------------------------------------------<br>
number of tests failed : 1<br>
number of tests passed : 51<br>
+ ----<br>
total number of tests : 52<br>
****************************************************<br>
<br>
Comments welcomed. We need more clang expertise here than libc++ expertise.<br>
<span class="HOEnZb"><font color="#888888"><br>
Howard<br>
</font></span><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>