FAQ Database Discussion Community


Is there Predefined-Macros define about byte order in armcc

c,armcc,predefined-macro
Is there Predefined-Macros define about byte order in armcc. I am a novice on the armcc.and sorry for my English. In gcc these are macros: __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ __ORDER_BIG_ENDIAN__ __ORDER_PDP_ENDIAN__ ... Now I have to use armcc, Is there same like these with armcc? Thank a lot. by the way,the armcc...

What is the use of __packed attribute in function arguments

c,padding,armcc
int readint(__packed int *data) { return *data; } I have seen __packed attribute in struct declarations to avoid padding. However, what is the benefit of using __packed attribute in function arguments. The author says that he has used __packed to tell the compiler that the integer may possibly not be...