Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
5-2-3 possibly flawed
#2
5-2-2 is a rule to protect against undefined behaviour - hence it's required

5-2-3 is more of a style issue. Neither of the two examples shown have undefined behaviour, but arguably the 'good' version that doesn't use the cast is clearer - hence this rule is only advisory
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)