MISRA Discussion Forums

Full Version: Rules 11.4 and 11.5: addressing only explicit cast ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Theses both rules (11.4 and 11.5) prevents against bad casting between pointers.

In my understanding, these both rules are applicable for explicit and implicit cast: The problematic is the same for explicit or implicit cast.

The understanding of my MISRA-checker-tools is that these rules address only explicit cast (these rules give only explicit cast example, and anywhere implicit cast is mentioned).
And this pointer implicit cast is not covered by another MISRA rule (Rules 10.1 and 10.2 don't address pointers cast but only integer and float implicit casts.)

Could you confirm which understanding is the good one?

Thanks in advance.
Any attempt to perform an implicit conversion involving a pointer (other than pointer to void) is not legal C and is therefore a violation of rule 1.1.