Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
11.5: Conversion from point to void
#2
The exception to rule 11.3 exists because conversion from a "pointer to object" to a "pointer to character" type is a commonly used programming idiom for accessing the underlying byte data of the object.

There is no such compelling requirement for conversions from other types such as "pointer to void" and so no exception has been made in that case.

The conversion from void* to another pointer type requires a deviation as no type information is included. This includes conversions from void* to char*.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)