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 #ifndef av_always_inline
36 #if AV_GCC_VERSION_AT_LEAST(3,1)
37 # define av_always_inline __attribute__((always_inline)) inline
39 # define av_always_inline inline
44 #if AV_GCC_VERSION_AT_LEAST(3,1)
45 # define av_noinline __attribute__((noinline))
52 #if AV_GCC_VERSION_AT_LEAST(3,1)
53 # define av_pure __attribute__((pure))
60 #if AV_GCC_VERSION_AT_LEAST(2,6)
61 # define av_const __attribute__((const))
68 #if AV_GCC_VERSION_AT_LEAST(4,3)
69 # define av_cold __attribute__((cold))
76 #if AV_GCC_VERSION_AT_LEAST(4,1)
77 # define av_flatten __attribute__((flatten))
83 #ifndef attribute_deprecated
84 #if AV_GCC_VERSION_AT_LEAST(3,1)
85 # define attribute_deprecated __attribute__((deprecated))
87 # define attribute_deprecated
93 # define av_unused __attribute__((unused))
105 #if AV_GCC_VERSION_AT_LEAST(3,1)
106 # define av_used __attribute__((used))
113 #if AV_GCC_VERSION_AT_LEAST(3,3)
114 # define av_alias __attribute__((may_alias))
121 #if defined(__GNUC__) && !defined(__ICC)
122 # define av_uninit(x) x=x
124 # define av_uninit(x) x
129 # define av_builtin_constant_p __builtin_constant_p
130 # define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
132 # define av_builtin_constant_p(x) 0
133 # define av_printf_format(fmtpos, attrpos)