On Mon, 2019-06-17 at 17:06 +0800, Qu Wenruo wrote: [...] > But then this means, we should have two copies of data for every such > structures. One for the fixed format one, and one for the compiler > aligned one, with enough helper to convert them (along with needed > endian convert). I don't think it does mean this. The compiler can easily access the packed data by pointer, the problem on systems requiring strict alignment is that it has to be done with byte accesses, so instead of a load word for a pointer to an int, you have to do four load bytes. This is mostly a minor slowdown so trying to evolve a whole infrastructure around copying data for these use cases really wouldn't be a good use of resources. James
Attachment:
signature.asc
Description: This is a digitally signed message part