Il 21/10/2013 14:53, Peter Maydell ha scritto: > Yes, using __sync_swap seems to work OK. Does clang on linux > require the four-argument __atomic_exchange() or can we just > make the #ifdef __clang__ come first in the #if ladder?
Please do that (change the ladder), it's definitely a good idea. > http://libcxx.llvm.org/atomic_design_a.html suggests llvm/clang's > __atomic_exchange() is three argument on all platforms, ie this > isn't just a macos weirdness. It's not. It's definitely a pity that GCC and LLVM disagree. :( Mystery... Paolo