Merge branch 't/write_consolidation'
[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 the number of the
9  * first variadic parameter. If q is specified as zero, the compiler only
10  * checks the format string for consistency.
11  */
12 # define __printf(p,q) __attribute__ ((format (printf, p, q)))
13 # define __a_const __attribute__ ((const))
14
15 /*
16  * As direct use of __printf(p,q) confuses doxygen, here are some extra macros
17  * for those values p,q that are actually used.
18  */
19 #define  __printf_2_0 __printf(2,0)
20 #define  __printf_1_2 __printf(1,2)
21 #define  __printf_2_3 __printf(2,3)
22
23 # if __GNUC__ > 3  || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
24 # define __must_check   __attribute__ ((warn_unused_result))
25 # else
26 # define __must_check   /* no warn_unused_result */
27 # endif
28
29 #define _static_inline_ static inline
30