[Bug c++/60932] make stdatomic.h compatible with C++

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 23 13:01:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #5)
> #ifdef __cplusplus
> #include <atomic>
> using namespace std;
> #else
> #include <stdatomic.h>
> #endif
> 
> atomic<int> i;

Doh, sorry, that should say atomic_int not atomic<int>
(I changed my testcase after finding the atomic_int version failed with
libstdc++)



More information about the Gcc-bugs mailing list