4.2.8 __has_c_attribute

The special operator __has_c_attribute (operand) may be used in ‘#if’ and ‘#elif’ expressions in C code to test whether the attribute referenced by its operand is recognized by GCC in attributes using the ‘[[]]’ syntax. GNU attributes must be specified with the scope ‘gnu’ or ‘__gnu__’ with __has_c_attribute. When operand designates a supported standard attribute it evaluates to an integer constant of the form YYYYMM indicating the year and month when the attribute was first introduced into the C standard, or when the syntax of operands to the attribute was extended in the C standard.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-11.1.0/cpp/_005f_005fhas_005fc_005fattribute.html