https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114007
--- Comment #26 from Iain Sandoe <iains at gcc dot gnu.org> --- but from your initial post it's also guarded by: #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif so it will always be 0 for clang in C mode, since that does not define __has_cpp_attribute