To add to that, since the referred article doesn't mention it, for GCC there is a "packed" attribute you can set on a data structure.
e.g.
Qt Code:
struct foo { char a; int x[2] __attribute__ ((packed)); };To copy to clipboard, switch view to plain text mode
Bookmarks