On Mon, 2004-04-26 at 15:02, address@hidden wrote:
Once the structs are nicely aligned I can see no reason to use struct packing
compiler directives.
But of course, we can't be 100% certain until it have been tested.
It's not just the initial alignment that is important, it's also the
layout within the structure. Without a packed struct (I think - could
be wrong on this!) you can't guarantee that the compiler won't insert
gaps (or reorder the elements) within the struct. Normally this isn't a
problem as the program is self-consistent, but when you try to access a
network packet using a struct you would clearly be in all sorts of
problems if there were gaps in the struct that aren't in the packet.