Hi,
i was under the impression that these rules apply to for loops only, as all examples show only for loops.
I recently ran across a static analyzer, which applied these rules to while loops too.
Is this intended by MISRA?
Thanks in advance.
Rules 6-5-1 to 6-5-6
Moderators: david ward, misra cpp
-
- Posts: 109
- Joined: Wed Apr 27, 2016 2:33 pm
- Company: Elektrobit Automotive GmbH
-
- Posts: 148
- Joined: Mon Jun 02, 2008 1:55 pm
- Company: MISRA
Re: Rules 6-5-1 to 6-5-6
6-5-1 only applies to for loops, arguably 6-5-2 to 6-5-6 may apply to while loops as well.
These rules are under consideration in light of this and MISRA C:2012's approach
These rules are under consideration in light of this and MISRA C:2012's approach
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group