For a 32-bit processor, data is retrieved from memory in "natural" chunks of 32-bits in size. The compiler is adjusting the way your structure is stored to make memory access faster. In your other compiler, memory was organized similar to this (each row is aligned to a 32-bit boundary in memory):
Code:
Byte1 Byte2 Byte3 Byte4
---------- ---------- ---------- ----------
field[0] field[1] field[2] field[3]
field[4] field[5] other-------other-----
other-------other unused unused
For the computer to access the "other" data member, it would need to do two memory fetches. The first fetch would get the first half of the field (in the 32-bit location shared with field[4] and field[5]), and the second fetch would get the remaining half. Then the processor would have to do some bit-wise shifting and bitwise ORing to get the real value. What g++ did is this:
Code:
Byte1 Byte2 Byte3 Byte4
---------- ---------- ---------- ----------
field[0] field[1] field[2] field[3]
field[4] field[5] unused unused
other-------other-------other-------other
By adding two bytes worth of "buffer", the compiler has now made the "other" member aligned to a 32-bit boundary. That means the computer can access that data in a single memory fetch.
So, that's why sizeof(whatever) reports 12 bytes (those two unused bytes are implicitly included), and it's also why the address of "other" is 2 bytes different from your other compilers.
Now, if you don't like this, there's a compiler directive to prevent this behavior. It's something like __PACKED. I forget exactly what it is, but unless you're going to have a data set so huge that you're worried about using all of your available memory, then it's not worth your time to hunt it down.