Revision 0374152f

View differences:

libavutil/attributes.h
96 96
#endif
97 97
#endif
98 98

  
99
/**
100
 * Mark a variable as used and prevent the compiler from optimizing it
101
 * away.  This is useful for variables accessed only from inline
102
 * assembler without the compiler being aware.
103
 */
104
#ifndef av_used
105
#if AV_GCC_VERSION_AT_LEAST(3,1)
106
#    define av_used __attribute__((used))
107
#else
108
#    define av_used
109
#endif
110
#endif
111

  
99 112
#ifndef av_alias
100 113
#if (!defined(__ICC) || __ICC > 1200) && AV_GCC_VERSION_AT_LEAST(3,3)
101 114
#   define av_alias __attribute__((may_alias))
libavutil/internal.h
46 46
#endif
47 47
#endif
48 48

  
49

  
50
/**
51
 * Mark a variable as used and prevent the compiler from optimizing it away.
52
 * This is useful for asm that accesses varibles in ways that the compiler does not
53
 * understand
54
 */
55
#ifndef attribute_used
56
#if AV_GCC_VERSION_AT_LEAST(3,1)
57
#    define attribute_used __attribute__((used))
58
#else
59
#    define attribute_used
60
#endif
61
#endif
62

  
63 49
#ifndef INT16_MIN
64 50
#define INT16_MIN       (-0x7fff - 1)
65 51
#endif
libavutil/mem.h
41 41
        static const t __attribute__((aligned(n))) v
42 42
#elif defined(__GNUC__)
43 43
    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
44
    #define DECLARE_ASM_CONST(n,t,v)    static const t attribute_used __attribute__ ((aligned (n))) v
44
    #define DECLARE_ASM_CONST(n,t,v)    static const t av_used __attribute__ ((aligned (n))) v
45 45
#elif defined(_MSC_VER)
46 46
    #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
47 47
    #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v

Also available in: Unified diff