This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64658] New: std::atomic_init() undefined
- 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: Sun, 18 Jan 2015 17:10:52 +0000
- Subject: [Bug libstdc++/64658] New: std::atomic_init() undefined
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64658
Bug ID: 64658
Summary: std::atomic_init() undefined
Product: gcc
Version: 4.9.2
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
#include <atomic>
int main()
{
std::atomic_int a;
atomic_init(&a, 0);
}
$ g++ -std=c++11 at.cc
In file included from at.cc:1:0:
/home/jwakely/gcc/5/include/c++/5.0.0/atomic:924:5: warning: inline function
âvoid std::atomic_init(std::atomic<_ITp>*, _ITp) [with _ITp = int]â used but
never defined
atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept;
^
/tmp/ccZgPnay.o: In function `main':
/tmp/at.cc:6: undefined reference to `void
std::atomic_init<int>(std::atomic<int>*, int)'
collect2: error: ld returned 1 exit status