WenZhan Song @ Tue, 12 Feb 2008 14:33:00 -0800:
>
> Our group are using tinyos with msp430 and find the msp430-gcc compiler can
> not handle packed struct correctly. See the below code scratch and test
> results. I wonder whether this will be fixed in near future.
>
> typedef struct tTestPointer
>   {
>     uint8_t m;
>     uint16_t k;
>     uint32_t l;
>   } __attribute__ ((packed)) tTestPointer;

Are you sure, you are not "caught out"?

http://mspgcc.sourceforge.net/manual/x214.html

Better to look at assembler output (`gcc -S` or `objdump -S`), to make
sure C compiler is doing, what you requested.
_____


Reply via email to