This rule is part of MISRA C++:2023.
Usage of this content is governed by Sonar’s terms and conditions. Redistribution is
prohibited.
Rule 9.6.1 - The goto statement should not be used
Category: Advisory
Analysis: Decidable,Single Translation Unit
Rationale
The use of goto is usually regarded as bad programming practice as it can lead to code that is difficult to understand and analyse.
Restructuring code to avoid its use generally leads to code that has a lower level of complexity.
If this advice is not followed, M23_126: MISRA C++ 2023 Rule 9.6.3 ensure that the use of goto does not result in code
that is considered to be unstructured.
Copyright The MISRA Consortium Limited © 2023