Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 16.8 and 14.7
#2
Rule 14.7 requires that a function have a single point of exit. However if the rule is deviated, a function might have multiple points of exit. In this case, it is still important that each point of exit in a non-void function return a value. So, Rule 16.8 should be interpreted as applying to *all* points of exit even though this will usually be a single point of exit.

There is no significance in the use of the word "path" in rule 16.8. An exit path must pass through an exit point so the rule could also be interpreted as saying "All exit points from a function ... "
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)