Hi,

I am using telosb motes and I think that there is a problem of the MSP430 
compiler:  

Suppose we have the following program:

typedef struct {int a; int b; int c;}TMP;   
typedef struct {int x; int y;}POS;
TMP tmp; 
POS * pPos;
tmp.a = 1;
tmp.b = 1;
tmp.c = 1;
pPos = (POS*) ((char*)&tmp + sizeof(int));

pPos->x = 1;

Then, the value of pPos->y will be 0x0100, but pPos->x will be 0x0001 (lower 
byte of pPos->x is 0x01 and the higher byte is 0x00).  

How can I fix this problem?  Thanks!

Best regards,
Hejun
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to