https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89641
Bug ID: 89641 Summary: std::atomic<T> no longer works Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: d25fe0be at outlook dot com Target Milestone: --- Live example: https://wandbox.org/permlink/j7rBCbdmy9sUBRZQ Compiling the following snippet ... ```cpp #include <atomic> std::atomic<int> x; int main() { ++x; } ``` ... fails with: ``` /opt/wandbox/gcc-head/include/c++/9.0.1/bits/atomic_base.h:319:45: error: cannot convert 'const std::memory_order' to 'int' 319 | { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } | ^~~~~~~~~~~~~~~~~~~~ | | | const std::memory_order <built-in>: note: initializing argument 3 of 'unsigned int __atomic_add_fetch_4(volatile void*, unsigned int, int)' ``` I guess that this is related to implementing P0439R0 (Make std::memory_order a scoped enumeration)?