Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    Note that a C compiler can also be instructed by hints (directives added to the structure declaration), saying that the strict order of members is nor required, so it could reorder them by placing first the members with the largest alignement before placing others (possibly filling padding gaps left between members with larger alignment) So that structure could be compiled as if it was: ` struct /*compacting directive here*/ T { size_t y; (8 byte) bool x; (1 byte) bool z; (1 byte) (6 byte inserted padding for struct T) };` Commented Oct 10, 2020 at 17:40