17-07-2018, 12:56 PM
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
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
the MISRA C++ Working Group