https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109653
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, __has_cpp_attribute never returns 0 for unknown attributes #if defined __has_cpp_attribute # if __has_cpp_attribute (fakeattribute) # error errorout # endif #endif I thought it should.