This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Apr 2014 13:21:47 +0000
- Subject: [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs
- Auto-submitted: auto-generated
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);
}