https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77378
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think the preprocessor macro in this case would be __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 for SImode and __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 for DImode, and the compiler side should use a matching: #ifndef HAVE_sync_compare_and_swapsi #define HAVE_sync_compare_and_swapsi 0 #endif #ifndef HAVE_atomic_compare_and_swapsi #define HAVE_atomic_compare_and_swapsi 0 #endif if (HAVE_sync_compare_and_swapsi || HAVE_atomic_compare_and_swapsi) (or s/si/di/g) as in c-cppbuiltin.c.