Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 6-6-5 A function shall have a single point of exit at the end of function.
#3
We agree with mishak, the single point of exit from a function is a requirement of ISO/IEC 61508. Indeed, it is the only specific design requirement it places on code, and as you point out, arguably it can make code worse.

Your comment about 6-6-5 is incorrect - this is legal code. It’s called a function-try-block, and doesn't require brackets around the try..catch statements
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)