MISRA Discussion Forums

Full Version: Typecasting from signed to unsigned and vis-verse
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Please can anybody help me to understand whether Misra C rules support signed to unsigned and vis-verse data typecasting?

Thanks in advance,
Deepa
It is unclear whether this question has been superceded by the post at http://www.misra.org.uk/forum/viewtopic.php?t=1398 in the MISRA C:2004 part of bulletin board

8.11 is a section on pointer conversions. For example:
Code:
UINT_32 *ptr_u32 = ....
SINT_32 *ptr_s32 = ....

ptr_u32 = (UINT_32 *) ptr_s32; // violates rule 11.3