32
32
# define AV_GCC_VERSION_AT_LEAST(x,y) 0
35
#ifndef av_always_inline
36
35
#if AV_GCC_VERSION_AT_LEAST(3,1)
37
36
# define av_always_inline __attribute__((always_inline)) inline
37
#elif defined(_MSC_VER)
38
# define av_always_inline __forceinline
39
40
# define av_always_inline inline
44
43
#if AV_GCC_VERSION_AT_LEAST(3,1)
45
44
# define av_noinline __attribute__((noinline))
47
46
# define av_noinline
52
49
#if AV_GCC_VERSION_AT_LEAST(3,1)
53
50
# define av_pure __attribute__((pure))
60
55
#if AV_GCC_VERSION_AT_LEAST(2,6)
61
56
# define av_const __attribute__((const))
68
61
#if AV_GCC_VERSION_AT_LEAST(4,3)
69
62
# define av_cold __attribute__((cold))
76
67
#if AV_GCC_VERSION_AT_LEAST(4,1)
77
68
# define av_flatten __attribute__((flatten))
79
70
# define av_flatten
83
#ifndef attribute_deprecated
84
73
#if AV_GCC_VERSION_AT_LEAST(3,1)
85
74
# define attribute_deprecated __attribute__((deprecated))
87
76
# define attribute_deprecated
92
79
#if defined(__GNUC__)
93
80
# define av_unused __attribute__((unused))
100
86
* Mark a variable as used and prevent the compiler from optimizing it
101
87
* away. This is useful for variables accessed only from inline
102
88
* assembler without the compiler being aware.
105
90
#if AV_GCC_VERSION_AT_LEAST(3,1)
106
91
# define av_used __attribute__((used))
113
96
#if AV_GCC_VERSION_AT_LEAST(3,3)
114
97
# define av_alias __attribute__((may_alias))
121
102
#if defined(__GNUC__) && !defined(__ICC)
122
103
# define av_uninit(x) x=x
124
105
# define av_uninit(x) x
129
109
# define av_builtin_constant_p __builtin_constant_p
133
113
# define av_printf_format(fmtpos, attrpos)
116
#if AV_GCC_VERSION_AT_LEAST(2,5)
117
# define av_noreturn __attribute__((noreturn))
136
122
#endif /* AVUTIL_ATTRIBUTES_H */