@@ -99,17 +99,21 @@ # define OF_UNLIKELY(cond) (cond) # define OF_CONST_FUNC # define OF_NO_RETURN_FUNC # define OF_WEAK_REF(sym) #endif + +#ifdef __GNUC__ +# define OF_ALIGN(alignment) __attribute__((__aligned__(alignment))) +#endif #if __STDC_VERSION__ >= 201112L # define OF_ALIGNOF(type) _Alignof(type) # define OF_ALIGNAS(type) _Alignas(type) #else # define OF_ALIGNOF(type) __alignof__(type) -# define OF_ALIGNAS(type) __attribute__((__aligned__(__alignof__(type)))) +# define OF_ALIGNAS(type) OF_ALIGN(OF_ALIGNOF(type)) #endif #if __STDC_VERSION__ >= 201112L && defined(OF_HAVE_MAX_ALIGN_T) # define OF_BIGGEST_ALIGNMENT _Alignof(max_align_t) #else