[quote user="matteo lucarelli"]- with and without compiler optimization enabled[/quote]
That won't affect packing of structure members.
[quote user="matteo lucarelli"]- with and without __attribute__ ((packed)) in the definition (enabling gcc extension compatibility)[/quote]
That will.
[quote user="matteo lucarelli"]Can I rely this pack mode will be used for future update, optimizations and so?[/quote]
No. The structure members are presently being packed as needed. But that is because of happenstance, and not explicit intention. Put another way, you are getting lucky. Suppose you add another field somewhere in the middle of the structure. That could throw everything off. If you need the structure to be packed, then use the packed attribute.
Thanks and regards,
-George