GCC attribute macros

Updated: April 19, 2023

Convenience macros that make it easier to use some of the options provided by the GCC keyword __attribute__.

Description:

The tasks these macros perform include managing attribute support for the different GCC versions and specifying whether the code to compile uses GCC (which is required to use __attribute__).

If the GCC version doesn't support __attribute__, these macros revert to being empty.

For more information about specific attributes, go to https://gcc.gnu.org/onlinedocs/.

Definitions:

#define QH_ATTR_FUNC_FORMAT_PRINTF(__STRING_INDEX, __FIRST_TO_CHECK) 
#define QH_ATTR_FUNC_CONSTRUCTOR_PRIORITY(__PRIORITY) 
#define QH_ATTR_FUNC_DESTRUCTOR_PRIORITY(__PRIORITY) 
#define QH_ATTR_FUNC_NONNULL_PARAMS(...) 
#define QH_ATTR_FUNC_DEPRECATED(__MSG) 
#define QH_ATTR_ENUM_DEPRECATED(__MSG) 
#define QH_ATTR_VAR_VISIBILITY(__VISIBILITY)