Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clarification of Composite Expressions and casts
#2
You are correct in saying that the second example is not a violation of rule 10.8. The operand of the uint32 cast is the uint16 cast which is not in the list of composite operators.

When writing the MISRA C guidelines, the working group felt that the presence of the cast indicated that the programmer knew what type was expected and hence the issues covered in section 8.10.3 did not arise.
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)