Options of fixing biggest alignment in PR target/38736
Ian Lance Taylor
iant@google.com
Thu Jan 8 20:40:00 GMT 2009
"H.J. Lu" <hjl.tools@gmail.com> writes:
> We can solve it with
>
> 1. A target should define MALLOC_ABI_ALIGNMENT properly.
> 2. g++ should issue an error when the default new operator
> is used on a type whose alignment is greater than
> MALLOC_ABI_ALIGNMENT.
> 3. It is user's responsibility to provide a new operator to return
> a properly aligned memory.
> 4. g++ can assume memory return by the user-provided new
> operator is properly aligned.
Sounds good as far as it goes. How do we get there from here? What
should the behaviour of __attribute__ ((aligned)) be? Should we add
any new __attribute ((aligned (XXX))) options?
Ian
More information about the Gcc
mailing list