Re: When is an unaligned memory access illegal on ARM?
Re: When is an unaligned memory access illegal on ARM?
- Subject: Re: When is an unaligned memory access illegal on ARM?
- From: Jens Alfke <email@hidden>
- Date: Mon, 23 Jun 2014 11:21:02 -0700
On Jun 22, 2014, at 8:18 PM, Roland King < email@hidden> wrote: What 'aligned' is for any given type is up to the compiler. The only way I can see that the compiler is 'right' in this instance is if uint32_t pointers are defined to be 8 byte aligned (even though you'd think it would be 4 byte)
It’s easy to prove that’s not the case, by defining a struct like struct { uint32_t a, b; } foo; and evaluating sizeof(foo), which is 8 not 12. I.e. Clang treats uint32_t as 4-byte aligned as we’d expect.
—Jens
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden