id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12478,boost::atomic< char* > generates warning on fetch_add on gcc 4.8+,Matt Hauck ,Andrey Semashev,"I have a `boost::atomic< char* >` object, on which I am calling `fetch_add` with `ptrdiff_t`, and apparently only on gcc 4.8+, I am getting the following warning: {{{ In file included from /home/foo/packages/boost_1_61_0/include/boost/atomic/detail/atomic_template.hpp:25:0, from /home/foo/packages/boost_1_61_0/include/boost/atomic/atomic.hpp:22, from /home/foo/packages/boost_1_61_0/include/boost/atomic.hpp:12, from /home/foo/code/ThingThatUsesAtomic.h:0, /home/foo/packages/boost_1_61_0/include/boost/atomic/detail/bitwise_cast.hpp: In instantiation of ‘To boost::atomics::detail::bitwise_cast(const From&) [with To = char*; From = long unsigned int]’: /home/foo/packages/boost_1_61_0/include/boost/atomic/detail/atomic_template.hpp:449:59: required from ‘T* boost::atomics::detail::base_atomic::fetch_add(boost::atomics::detail::base_atomic::difference_type, boost::memory_order) volatile [with T = char; boost::atomics::detail::base_atomic::value_type = char*; boost::atomics::detail::base_atomic::difference_type = long int]’ [ actual code references redacted ... ] /home/foo/packages/boost_1_61_0/include/boost/atomic/detail/bitwise_cast.hpp:41:5: warning: casting ‘char*’ to ‘char&’ does not dereference pointer }}}",Bugs,closed,To Be Determined,atomic,Boost 1.61.0,Problem,fixed,,