https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98965
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- The topic came up in a discussion on the WG14 reflector. For waht it's worth, my impression is that it's simply an oversight, a result of an incomplete integration of atomics into the core language. It would be hard to justify making this (deliberately) undefined. The member type information is readily available at the point of the assignment so if it's not meant to be supported the standard could easily require a diagnostic without imposing a great burden on implementations. Until or unless the standard is clarified, unless we choose to implement the assignment atomically, issuing a warning would help prevent bugs. As a data point, of the compilers on Godbolt only Clang and GCC support _Atomic structs and neither locks the member.