ba1d82ead77ac6ae937a15a4e691ba8afc2f21b2
[paraslash.git] / gcc-compat.h
1 #define inline inline __attribute__ ((always_inline))
2 #define __noreturn __attribute__ ((noreturn))
3 #define __malloc __attribute__ ((malloc))
4 #define __a_unused __attribute__ ((unused))
5 #define __a_aligned(alignment) __attribute__((__aligned__(alignment)))
6
7 /*
8 * p is the number of the "format string" parameter, and q is
9 * the number of the first variadic parameter.
10 */
11 # define __printf(p,q) __attribute__ ((format (printf, p, q)))
12 # define __a_const __attribute__ ((const))
13 /*
14 * as direct use of __printf(p,q) confuses doxygen, here are two extra macros
15 * for those values p,q that are actually used by paraslash.
16 */
17 #define __printf_1_2 __printf(1,2)
18 #define __printf_2_3 __printf(2,3)
19
20 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
21 # define __must_check __attribute__ ((warn_unused_result))
22 # else
23 # define __must_check /* no warn_unused_result */
24 # endif
25
26 #define _static_inline_ static inline
27