It assume_aligneddoesn't seem to be supported on RHEL GCC (it was not passed to the upstream branch of gcc-4_8, nor is it available on Ubuntu 14.04 GCC 4.8.4, so this is not surprising).
, GCC :
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
# warning "Your version of GCC does not support 'assume_aligned' attribute"
#endif
, back-ported assume_aligned ( RedHat Ubuntu, ). - configure script Makefile:
CFLAGS += $(shell echo 'void* my_alloc1() __attribute__((assume_aligned(16)));' | gcc -x c - -c -o /dev/null -Werror && echo -DHAS_ASSUME_ALIGNED)
HAS_ASSUME_ALIGNED , .
, __builtin_assume_aligned:
void foo() {
double *p = func_that_misses_assume_align();
p = __builtin_assume_aligned(p, 128);
...
}