MISRA Discussion Forums
Rules 6-5-1 to 6-5-6 - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18)
+--- Forum: MISRA C++:2008 rules (https://forum.misra.org.uk/forumdisplay.php?fid=19)
+---- Forum: 6.5 Expressions (C++) (https://forum.misra.org.uk/forumdisplay.php?fid=134)
+---- Thread: Rules 6-5-1 to 6-5-6 (/showthread.php?tid=1240)



Rules 6-5-1 to 6-5-6 - dg1980 - 28-04-2016

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.


Re: Rules 6-5-1 to 6-5-6 - misra cpp - 11-10-2016

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