I'm using a #pragma pack(push,1), #pragma pack(pop) around structs where 
exact memory layout matters (disable alignment, and I would assume also 
prevent reordering of members, although I never saw this in real-life on 
any compiler I used). clang and emcc seem to support this just fine.

-Floh.

Am Mittwoch, 16. April 2014 04:47:53 UTC+2 schrieb Joshua Litt:
>
> I would like to take advantage of the layout of member variables in my 
> Javascript layer.  It would be nice to just return pointers to simple 
> objects, and use dataviews / typed arrays and offsets to read the necessary 
> data instead of copying or making a ton of calls into asm.js
>
> I am taking advantage of this already in my program, but is this behavior 
> actually defined or am I getting lucky?
>
> If reordering is occurring, it would be really nice to disable it 
> optionally.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to