Go to the documentation of this file. 3 #ifndef GIRARA_MACROS_H 4 #define GIRARA_MACROS_H 7 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) || defined(__clang__) 8 # define GIRARA_PRINTF(format_idx, arg_idx) \ 9 __attribute__((__format__ (__printf__, format_idx, arg_idx))) 11 # define GIRARA_PRINTF(format_idx, arg_idx) 16 # if defined(__GNUC__) || defined(__clang__) 17 # define GIRARA_UNUSED(x) UNUSED_ ## x __attribute__((unused)) 18 # elif defined(__LCLINT__) 19 # define GIRARA_UNUSED(x) x 21 # define GIRARA_UNUSED(x) x 26 # if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) 27 # define GIRARA_HIDDEN __attribute__((visibility("hidden"))) 28 # elif defined(__SUNPRO_C) 29 # define GIRARA_HIDDEN __hidden 31 # define GIRARA_HIDDEN 35 #ifndef GIRARA_DEPRECATED 36 # if defined(__GNUC__) 37 # define GIRARA_DEPRECATED(x) x __attribute__((deprecated)) 38 # define GIRARA_DEPRECATED_ __attribute__((deprecated)) 40 # define GIRARA_DEPRECATED(x) x 41 # define GIRARA_DEPRECATED_ 45 #ifndef GIRARA_ALLOC_SIZE 46 # if defined(__GNUC__) 47 # define GIRARA_ALLOC_SIZE(...) __attribute__((alloc_size(__VA_ARGS__))) 49 # define GIRARA_ALLOC_SIZE(x) 53 #ifndef GIRARA_DO_PRAGMA 54 # if defined(__GNUC__) || defined(__clang__) 55 # define GIRARA_DO_PRAGMA(x) _Pragma(#x) 57 # define GIRARA_DO_PRAGMA(x) 61 #ifndef GIRARA_IGNORE_DEPRECATED 62 # define GIRARA_IGNORE_DEPRECATED \ 63 GIRARA_DO_PRAGMA(GCC diagnostic push) \ 64 GIRARA_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations") 67 #ifndef GIRARA_UNIGNORE 68 # define GIRARA_UNIGNORE \ 69 GIRARA_DO_PRAGMA(GCC diagnostic pop)