Remix.run Logo
cyco130 16 hours ago

It is indeed part of the standard. It says "Within a structure object, the non-bit-field members and the units in which bit-fields reside have addresses that increase in the order in which they are declared"[1] which doesn't allow implementations to reorder fields, at least according to my understanding.

[1] https://open-std.org/JTC1/SC22/WG14/www/docs/n3220.pdf section 6.7.3.2, paragraph 17.

taminka 14 hours ago | parent [-]

i was talking abt padding/alignment, not ordering, that's indeed not allowed you're right