id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7140,asio fenced_block should use gcc builtin atomics when available on ARM,lars@…,chris_kohlhoff,"I am the lucky owner of a Raspberry Pi, and I have been trying to compile some code that uses boost asio on it (with the Raspbian armhf distro with boost 1.49 and gcc 4.6.3). I get a lot of ""Warning: swp{b} use is deprecated for this architecture"", some of which originate from gcc_arm_fenced_block.hpp. After a bit of looking around I realized that gcc 4.6.3 actually has support for the builtin atomics on this platform, so that gcc_sync_fenced_block.hpp could be used intead of trying to fix the assembler stuff in gcc_arm_fenced_block.hpp. So I propose the following fix to fenced_block.hpp: {{{ 28c28 < #elif defined(__GNUC__) && defined(__arm__) --- > #elif defined(__GNUC__) && defined(__arm__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) 57c57 < #elif defined(__GNUC__) && defined(__arm__) --- > #elif defined(__GNUC__) && defined(__arm__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) }}} Basically just skips using the gcc_arm_fenced_block if !__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is defined, and lets the _sync_ one get used instead. Of course I know that the !__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is actually not defined for all gcc versions where the builtins are available, but here we at least will use them when that symbol is defined, rather than not at all. I will write a similar ticket for boost smart_ptr, which suffers the same problem.",Bugs,closed,To Be Determined,asio,Boost 1.51.0,Problem,fixed,,