When trying to build a simple test program that uses atomic operations, I get the error
undefined reference to `___atomic_fetch_sub_4'
Specifically, it only happens when I do a --
combined with ==
:
std::atomic<std::size_t> foo;
if (--foo == 42) { ... }
The code compiles fine, but I get the error while trying to link. I'm using MinGW with GCC 4.7.