Every C compiler offers the option to "pack" C structures (e.g. __attribute__ ((__packed__))
, or #pragma pack()
). Now, we all know that packing is required, if we'd like to send or store data in a reliable way. This must also have been a requirement since the first days of the C language.
So I wonder why packed structures are not part of the C language specification? They're not even in C99 or C11 even though the necessity of having them is known for decades now? What I am missing? Why is it compiler specific?