2 ms·
Regarding to the struct packing: That's why I love Ada, there are so called representation clauses which can define the size of struct-alike types called record
by irundebian 3y ago
Regarding to the struct packing:
That's why I love Ada, there are so called representation clauses which can define the size of struct-alike types called records. In C you have to rely on compiler options or features like __attribute__ which are not compliant to the ISO C standard. It looks like there is a ISO-C compliant version for that since C11 but it just doesn't look nice and like a first class citizen of the language.
https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/representation_clauses_and_pragmas.html https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/r...