Main Content
AUTOSAR C++14 Rule M6-6-3
The continue
statement shall only be used within a well-formed
for
loop
Description
Rule Definition
The continue
statement shall only be used within a well-formed
for
loop.
Rationale
Using a continue
statement can add unnecessary complexity to code,
which can cause issues during testing due to the additional logic required.
Polyspace Implementation
The rule checker reports a violation for the use of continue
statements in:
for
loops that are not well-formed, that is,for
loops that violate rules 6-5-xwhile
loops
Troubleshooting
If you expect a rule violation but Polyspace® does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Statements |
Category: Required, Automated |
Version History
Introduced in R2019a