Conversions outside of the essential type categories - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4) +--- Forum: MISRA C:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21) +---- Forum: 8.10 The essential type model (https://forum.misra.org.uk/forumdisplay.php?fid=165) +---- Thread: Conversions outside of the essential type categories (/showthread.php?tid=1436) |
Conversions outside of the essential type categories - gdavis - 10-07-2018 Hello, With respect to the essential type rules, do conversions to types that are outside the essential type categories count as violations of the rules? For example: Code: #include Thank you for your time. -Greg Re: Conversions outside of the essential type categories - misra-c - 18-10-2018 Rules 10.2-10.8 only apply to expressions whose operands have arithmetic types. This will be clarified in a future release. Therefore rule 10.8 does not apply to "(uintptr_t)(p+1)". However p+1 violates rule 18.4 and (uintptr_t)(p+1) violates rule 11.4 |