Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rules 11.4 and 11.5: addressing only explicit cast ?
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.
Posted by and on behalf of the MISRA C Working Group

Forum Jump:

Users browsing this thread: 1 Guest(s)