Hi,
Using GCC extension __attribute__(__packed__)
I found this problem in my code :
With the __attribute__(__packed__)
ulCmd field is 0x00003F19 as reported in the watch window by the debugger. (This comes from a device memory mapped on the EMIFA bus)
state = tRecvPkt.tHead.ulCmd;
But compiled code returns 0x3F190000 in variable "state".
Without the __attribute__(__packed__)
There is no problem, I got the same answer between compiled code and debugger : 0x00003F19.
What is your opinion ? a bug ?
Frederic
TLR_UINT32 is defined as an uint32_t and I use the stdint.h 7.2.0B2.