MISRA Discussion Forums

Full Version: Appendix B - mapping of rule 10.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It seems there is a minor inconsistency in MISRA-C 2004. At top of pag. 103 (Appendix B) I can read that rule 77 in MISRA-C 1998 is mapped onto rule 10.2 in MISRA-C 2004. Indeed this latter is as duly reported in third column ("The value of an expression of floating type..."), but corresponding rule 77 in MISRA C 1998 is well different:

"The unqualifed type of parameters passed to a function shall be compatible with the unqualified expected types defined in the function prototype".

Can you help me?
Rule 77 is concerned with function calls and it requires the parameter to match exactly with the function argument type ( excluding volatile, const etc). Therefore you can not pass a short to a function expecting a long etc.

The closest rules to this in MISRA-C:2004 are 10.1 and 10.2, which includes a ban on implicit conversions on function arguments. It looks like rule 10.1 was missed out from the Appendix.