28-03-2025, 01:17 PM
You are right, your example is non-compliant with 9.3.1.
Whilst 'try' is always followed by a compound statement, there are now a number of compound statements after the 'while', the 'try' and an arbitrary number of 'catch'es. For simplicity, we prefer 'while' followed by a single compound statement.
Whilst 'try' is always followed by a compound statement, there are now a number of compound statements after the 'while', the 'try' and an arbitrary number of 'catch'es. For simplicity, we prefer 'while' followed by a single compound statement.
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group