Hey snake, just a short thing, your struct might not represent the real objects in memory.
The memory layout is only guaranteed for POD types, the compiler might do some optimization on the memory layout of your class and then accessing 'a' might result in an access to 'b' and 'c' might point to some foobar variable introduced by the compiler or whatsoever.

Also remark that structs in Lite-C are always __attribute__((packed)), so you might have to add padding variables depending on your architecture into the struct

So yeah, it is definitely a source of evil and hard to debug bugs, so you might have to look for some other way for communication (beside that having public variables outside of POD types is also considered as a very bad style).


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com