rspec/rules/S999/description.adoc

8 lines
707 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
Unconstrained use of ``++goto++`` can lead to programs that are extremely difficult to comprehend and analyse. For {cpp}, it can also lead to the program exhibiting unspecified behavior.
2020-06-30 12:50:59 +02:00
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
However, in many cases a total ban on ``++goto++`` requires the introduction of flags to ensure correct control flow, and it is possible that these flags may themselves be less transparent than the ``++goto++`` they replace.
2020-06-30 12:50:59 +02:00
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
Therefore, the restricted use of ``++goto++`` is allowed where that use will not lead to semantics contrary to developer expectations. "Back" jumps are prohibited, since they can be used to create iterations without using the well-defined iteration statements supplied by the core language.