https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117475
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Sebastian Huber from comment #6)
>
> I used the clang 17.0.6 from openSUSE Leap 15.6. With the clang from
> godbolt.org I get also failures.
Because that uses libstdc++ from GCC 7 which does NOT have C++20 compatibility
at all.
(In reply to Sebastian Huber from comment #7)
> This is not really great for C/C++ compatibility. Is there a way to get
> statically initialized atomic integers using the standard C++20 <atomic>?
As I mentioned you can do:
```
union U {
S s{};
};
```
To fix the issue by initializing the field s by default.
Other than that this is not a question for GCC since there is how standard C++
works.