Current standard is utterly stupid because it allows arbitrary padding of structs for performance reasons, but does not allow reordering.
What disallows reordering?
At least one thing AFAIR: the "address" of the first member of a struct must be equal to the address of the struct itself. IIRC, so please correct me if I'm wrong. So at least the first member could not be reordered.
Meaning:
struct { int n; .... } S;
&S shall be equal to &S.n, if I'm not mistaken.
Edit: checked in the standard. The following is pretty explicit:
As discussed in 6.2.5, a structure is a type consisting of a sequence of members, whose
storage is allocated in an ordered sequence, and a union is a type consisting of a sequence
of members whose storage overlap.
Edit2: if you're unconvinced the above strictly requires struct members to follow order of declaration (I'll admit it's not completely clear), there's a hint in that the last member of a struct can be a "flexible array" member. It's obvious that such a member could not be reordered. That was in C99...
In C11, things get clearer (so I guess the committee realized older revisions were not fully clear about it):
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. A pointer to a
structure object, suitably converted, points to its initial member (or if that member is a
bit-field, then to the unit in which it resides), and vice versa. There may be unnamed
padding within a structure object, but not at its beginning.
As things are, the C standard can't change this. This would break existing code all over the place.
If it introduced the possibility of reordering struct members by compilers, it could be done adding a specific qualifier next to the struct definition, so that wouldn't break existing code. Now of course, you would not be able to use the flexible array thing with this. It would have to be explicitely checked by compilers.
I wouldn't mind having this possibility of relaxing member ordering indeed, that would give compilers opportunities to optimize alignment and total size and would minimize required padding.