__builtin_memcpy and alignment assumptions
Jakub Jelinek
jakub@redhat.com
Fri Jan 8 17:35:00 GMT 2016
On Fri, Jan 08, 2016 at 03:28:53PM +0000, Paul_Koning@dell.com wrote:
> If it really is necessary to say that memcpy is defined to behave as if it had a cast to char* in its implementation, it would still be useful -- and obviously valid -- to rely on the greater alignment when there is other code in the block that uses it. And it would be helpful to have a way in the source program to say "I want you to rely on the type alignment".
We have a way to say that, look for __builtin_assume_aligned.
Jakub
More information about the Gcc
mailing list