[M3devel] Target.Allow_packed_byte_aligned
Hendrik Boom
hendrik at topoi.pooq.com
Mon Sep 21 22:25:49 CEST 2015
On Mon, Sep 21, 2015 at 04:37:18PM +0000, Jay K wrote:
> Also -- if anyone has a proposal that would allow Allow_packed_byte_aligned to always be true, that would also fit my agenda. I don't care true or false, I just want it the same across all targets.
> In particular, on IA64/NT you can say stuff like: #pragma pack(1) struct { char a; __unaligned int b; } A; A.b
> and you do get a 5 byte struct and b is at offset 1.The generated code will read b with multiple reads of bytes or shorts and reassemble the 4 byte integer.
> Perhaps m3front can behave similarly?For all targets?
> But for now I'll put it back and later when I generate bootstraps I'll see if they are equal, i.e. contain no packed types.
> - Jay
The fancy packing should remain in the language, for backward
compatibility if nothing else. modula 3 is, after all, a systems
language.
But is likely no need to worry it in the bootstrap.
If the bootstrap doesn't use it, it will still work portably as a
bootstrap, no matter how machine-dependent fancy packing happens to be.
-- hendrik
More information about the M3devel
mailing list