1 --- liblangtag/lt-macros.h
2 +++ liblangtag/lt-macros.h
5 * See the GNU C documentation for more details.
7 -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
8 +#if (defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))) || defined __clang__
9 # define LT_GNUC_PRINTF(format_idx, arg_idx) \
10 __attribute__((__format__ (__printf__, format_idx, arg_idx)))
11 # define LT_GNUC_UNUSED \
14 * See the GNU C documentation for details.
17 +#if (defined __GNUC__ &&__GNUC__ >= 4) || defined __clang__
18 # define LT_GNUC_NULL_TERMINATED \
19 __attribute__((__sentinel__))
23 * See the GNU C documentation for more details.
25 -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
26 +#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
27 #define LT_GNUC_DEPRECATED __attribute__((__deprecated__))
29 #define LT_GNUC_DEPRECATED
31 -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
32 +#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
33 #define LT_GNUC_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " instead")))
35 #define LT_GNUC_DEPRECATED_FOR(f) LT_GNUC_DEPRECATED
37 -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
38 +#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
39 #define LT_GNUC_BEGIN_IGNORE_DEPRECATIONS \
40 _Pragma ("GCC diagnostic push") \
41 _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")