http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940
Bug ID: 60940 Summary: general operations on atomic t ypes do not work with atomic integral typedefs Product: gcc Version: 4.10.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org This is rejected because the atomic operations only accept std::atomic<T> not the std::__atomic_base<T> base classes: #ifdef __cplusplus #include <atomic> using namespace std; #else #include <stdatomic.h> #endif atomic_int i; int main() { atomic_store(&i, 0); return atomic_load(&i); }