Go to the documentation of this file.
26 #ifndef AVUTIL_ATTRIBUTES_H
27 #define AVUTIL_ATTRIBUTES_H
30 # define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
32 # define AV_GCC_VERSION_AT_LEAST(x,y) 0
35 #if AV_GCC_VERSION_AT_LEAST(3,1)
36 # define av_always_inline __attribute__((always_inline)) inline
37 #elif defined(_MSC_VER)
38 # define av_always_inline __forceinline
40 # define av_always_inline inline
43 #if AV_GCC_VERSION_AT_LEAST(3,1)
44 # define av_noinline __attribute__((noinline))
45 #elif defined(_MSC_VER)
46 # define av_noinline __declspec(noinline)
51 #if AV_GCC_VERSION_AT_LEAST(3,1)
52 # define av_pure __attribute__((pure))
57 #if AV_GCC_VERSION_AT_LEAST(2,6)
58 # define av_const __attribute__((const))
63 #if AV_GCC_VERSION_AT_LEAST(4,3)
64 # define av_cold __attribute__((cold))
69 #if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__)
70 # define av_flatten __attribute__((flatten))
75 #if AV_GCC_VERSION_AT_LEAST(3,1)
76 # define attribute_deprecated __attribute__((deprecated))
77 #elif defined(_MSC_VER)
78 # define attribute_deprecated __declspec(deprecated)
80 # define attribute_deprecated
84 # define av_unused __attribute__((unused))
94 #if AV_GCC_VERSION_AT_LEAST(3,1)
95 # define av_used __attribute__((used))
100 #if AV_GCC_VERSION_AT_LEAST(3,3)
101 # define av_alias __attribute__((may_alias))
106 #if defined(__GNUC__) && !defined(__ICC)
107 # define av_uninit(x) x=x
109 # define av_uninit(x) x
113 # define av_builtin_constant_p __builtin_constant_p
114 # define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
116 # define av_builtin_constant_p(x) 0
117 # define av_printf_format(fmtpos, attrpos)
120 #if AV_GCC_VERSION_AT_LEAST(2,5)
121 # define av_noreturn __attribute__((noreturn))