Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 18.1 and Rule 11.3 compatibility
#4
The intention was that such pointer accesses should be be compliant with Rule 18.1, but the working group accept that this is not clear in the documentation.

A future technical clarification will include the following note in the Amplification for rule 18.1.
Quote: Note: A pointer to an object type(T) which has been converted to a pointer to a character type (see Exception to rule 11.3) shall be treated as an array of character type with bound equal to sizeof(T).
In the above example "ptr" should be treated as an "array of 4 unsigned char".
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)