
13 Mar
2006
13 Mar
'06
8:37 p.m.
Howard Hinnant wrote:
Hello,
I've been investigating some failures on Mac OS X, ppc concerning shared_ptr. One of the things that has struck me is that in boost/ detail/sp_counted_base_gcc_ppc.hpp, the __asm__ block in atomic_decrement is decorated with __volatile__, but the __asm__ blocks in atomic_increment and atomic_conditional_increment are not. The failure I'm seeing disappears when the __volatile__ attribute is added in the two missing places.
This is, I believe, intentional; the increments shouldn't be reorder-sensitive, at least in theory. Why/how does it fail?