Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
11.3: How many 'levels' deep?
#3
The short answer is "one".

A cast from "cv1 Type1 *" to "cv2 Type2 *" will only be compliant with this rule if Type1 and Type2 are the same, including their cv-qualifiers. However the cv-qualifiers ( cv1 and cv2 in your example ) at the top level may differ.

[Note: exceptions apply for casts between pointer to objects and pointers to char, signed char or unsigned char.]
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)