The C and C++ standards does not give any advice [or at least no firm rules] on what alignment should be. It is up to each compiler (and of course, what target the compiler is for) to determine a good policy. It's often preferred if this policy works for the target... ;)
Since the FPU [including SSE in scalar mode] of x86 can read "double" from any byte-address and I believe there is no direct benefit in adding more than 3 bytes between the b
and c
elements, nor to align the whole struct to anything more than 4 bytes. Doing more would waste memory.
In some other architecture, it may well be a great benefit (or a requirement for the target to operate correctly), and it would thus align the whole struct
to 8 bytes.