id summary reporter owner description type status milestone component version severity resolution keywords cc 13569 Broken build on newer versions of LLVM Emil Gilliam timblechmann "Starting with LLVM r331746, the use of compare-and-swap on a const object is not allowed. On x86 and Clang, this breaks several places in atomic/detail/ops_gcc_x86_dcas.hpp, like this: {{{ if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics value = __sync_val_compare_and_swap(&storage, (storage_type)0, (storage_type)0); #elif defined(BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS) ... }}} The use of compare-and-swap is actually a workaround for a Clang limitation which hasn't existed for a long time. Clang versions newer than 4.0.1 understand ""=&A"" contraints. I am attaching a proposed patch to ops_css_x86_dcas.hpp and config.hpp which detects the Clang version (using a __has_feature), and if it's new enough, uses the ""=&A"" constraint, otherwise falls back to the existing compare-and-swap. (I had to do a bit of fancy footwork with the #ifs to make this happen.) " Patches new To Be Determined atomic Boost 1.63.0 Problem