id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13121,std_fenced_block gets used for g++ 4.6.4 and hence buggy std::atomic_thread_fence,Richard Hazlewood ,chris_kohlhoff,"With g++ 4.6.4: using {{{asio}}} code that results in {{{detail::fenced_block}}} being used results in {{{detail::std_fenced_block}}} being used. This uses {{{std::atomic_thread_fence}}} but that has link issues with 4.6 (maybe https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51038). {{{g++4.6 -std=c++0x -I boost... }}} {{{ #include #ifdef BOOST_ASIO_HAS_STD_ATOMIC # pragma message(""Will use asio std_fenced_block"") #endif int main(int argc, char *argv[]) { (void)argc; (void)argv; boost::asio::detail::fenced_block block(boost::asio::detail::fenced_block::full); } }}} boost_asio.cpp:4:51: note: #pragma message: Will use asio std_fenced_block /tmp/ccNS0287.o: In function `boost::asio::detail::std_fenced_block::std_fenced_block(boost::asio::detail::std_fenced_block::full_t)': boost_asio.cpp:(.text._ZN5boost4asio6detail16std_fenced_blockC2ENS2_6full_tE[_ZN5boost4asio6detail16std_fenced_blockC5ENS2_6full_tE]+0x22): undefined reference to `std::atomic_thread_fence(std::memory_order)' /tmp/ccNS0287.o: In function `boost::asio::detail::std_fenced_block::~std_fenced_block()': boost_asio.cpp:(.text._ZN5boost4asio6detail16std_fenced_blockD2Ev[_ZN5boost4asio6detail16std_fenced_blockD5Ev]+0x13): undefined reference to `std::atomic_thread_fence(std::memory_order)' collect2: ld returned 1 exit status It looks like between 1.63 and 1.64, in ''detail/fenced_block.hpp'', the {{{#elif defined(BOOST_ASIO_HAS_STD_ATOMIC)}}} line takes precedence over the specific gcc test. However, {{{BOOST_ASIO_HAS_STD_ATOMIC}}} is defined for 4.6.4. ",Bugs,new,To Be Determined,asio,Boost 1.64.0,Problem,,g++ 4.6,