Member access for an atomic structure or union is unconditional undefined behavior (C11 6.5.2.3p5). However, we would issue a confusing error message about the base expression not being a structure or union type.
GCC issues a warning for this case. Clang now warns as well, but the warning is defaulted to an error because the actual access is still unsafe.
This fixes Issue 54563.
This seems to apply to both C and C++. I guess "_Atomic" is C only, so we get to define its behavior for C++?
What does GCC do in C++ mode?