[PATCH] Implement new hook for max_align_t_align

Bernd Edlinger bernd.edlinger@hotmail.de
Sat Oct 8 17:01:00 GMT 2016

bounced, resent...


I think your callback should also directly control the
alignment of max_align_t in stddef.h:

typedef struct {
   long long __max_align_ll __attribute__((__aligned__(__alignof__(long 
   long double __max_align_ld 
__attribute__((__aligned__(__alignof__(long double))));
   /* _Float128 is defined as a basic type, so max_align_t must be
      sufficiently aligned for it.  This code must work in C++, so we
      use __float128 here; that is only available on some
      architectures, but only on i386 is extra alignment needed for
      __float128.  */
#ifdef __i386__
   __float128 __max_align_f128 
} max_align_t;

otherwise these will not match.

I think is __alignof(max_aling_t) == max_align_t_align ()
on your target?


More information about the Gcc-patches mailing list