Go to the documentation of this file.
48 #ifndef _TUSB_COMPILER_GCC_H_
49 #define _TUSB_COMPILER_GCC_H_
55 #define ALIGN_OF(x) __alignof__(x)
58 #define ATTR_SECTION(sec_name) __attribute__ (( section(#sec_name) ))
61 #define ATTR_ERROR(Message) __attribute__ ((error(Message)))
64 #define ATTR_WARNING(Message) __attribute__ ((warning(Message)))
71 #define ATTR_ALIGNED(Bytes) __attribute__ ((aligned(Bytes)))
75 #define ATTR_PACKED __attribute__ ((packed))
77 #define ATTR_PREPACKED
79 #define ATTR_PACKED_STRUCT(x) x __attribute__ ((packed))
87 #ifndef ATTR_ALWAYS_INLINE
88 #define ATTR_ALWAYS_INLINE __attribute__ ((always_inline))
93 #define ATTR_NON_NULL __attribute__ ((nonull))
96 #define ATTR_PURE __attribute__ ((pure))
100 #define ATTR_CONST __attribute__ ((const))
103 #define ATTR_DEPRECATED __attribute__ ((deprecated))
106 #define ATTR_DEPRECATED_MESS(mess) __attribute__ ((deprecated(mess)))
109 #define ATTR_WEAK __attribute__ ((weak))
112 #define ATTR_ALIAS(func) __attribute__ ((alias(#func)))
115 #define ATTR_WEAKREF(func) __attribute__ ((weakref(#func)))
118 #define ATTR_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
121 #define ATTR_USED __attribute__ ((used))
124 #define ATTR_UNUSED __attribute__ ((unused))
134 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
135 #define __n2be(x) __REV(x)
136 #define __be2n(x) __n2be(x)
138 #define __n2be_16(u16) ((uint16_t) __REV16(u16))
139 #define __be2n_16(u16) __n2be_16(u16)