Am 05.05.2011 09:51, schrieb Krishnendu Chatterjee: > Hi, > > I don't understand what do you mean by "PORTABLE". Union is supported in > sdcc, gnu-arm, gcc and visual C. > And I have not seen any document stating that the usage of union in C is > bad :) >
The problem is not the union. However uint8_t and uint32_t might not be there (unlike e.g. uint_least8_t or uint_least32_t, which are required). E.g. when an architecture has no 8-bit data type, this could happen: sizeof(unsiged char) == sizeof(uint_least8_t) == sizeof(unsigned int) == sizeof(uint16_t) == 1 Philipp ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user