Prevent compiler padding structures out to WORD boundaries
Hi,
If you have a structure that is an odd number of bytes (say 7 bytes), the compiler
will probably add 1 byte to pad it out to 8bytes (so the sizeof() function will return
the structure size as 8 bytes).
99.99% of the time this is ok. Is there a compiler driective I can insert in the structure definition if I want sizeof() to return the as_desgined number of bytes(in this particular example 7 bytes)?
|