gcc 4.1.1 (cross compiler)
gcc 3.3.2 (cross compiler)
Both are for the ARM.
The structure:the following code is compiled with BOTH compilers:Code:struct something { uint8_t num; uint16_t val; uint16_t time; }the results:Code:int main(void) { printf("Size of struct something = %i.\n", sizeof(struct something)); return 0; }
gcc 4.1.1: 6
gcc 3.3.2: 8
So, without using __attribute__((aligned (2),packed)), is there any other option I have?
[EDIT]Fixed the compiler versions. . . [/edit]