https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99587
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- But we currently have no easy way how to know that. The rejection of the attribute as unsupported is done in various places and can depend on many conditions, in this case it is just a configure thing (plus it is ignored on entities other than variables and function declarations), but for other attributes it can depend on command line options, and that can even be changed on a function by function basis. __has_attribute as currently implemented just answers the question whether gcc knows about the attribute (has it registered).