[Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 23 13:21:00 GMT 2014
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);
}
More information about the Gcc-bugs
mailing list