https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117641
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 59658 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59658&action=edit gcc15-pr117641-2.patch You're right. Here is incremental patch. For __atomic_exchange/__atomic_compare_exchange and the likes it will still work because for !atomic_size_supported_p we switch to using libatomic generic APIs. But of course, for __atomic_*_n and __sync_* that can't happen and so it needs to be an error.