https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89864
--- Comment #7 from Erik Schnetter <schnetter at gmail dot com> --- I tried adding a fixinclude that #defines _Atomic to volatile if the system header is included from C++, and this resolved the issue for me. A possible implementation is described here <https://github.com/spack/spack/issues/11042>. I plan to submit a proper patch to GCC next week.