Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loops violate Rule 14.3
#1
Hello.

In our company, we have developers who uses
Code:
for(;;)
loops. Are these a violation against rule 14.3?

kind regards.
<t></t>
Reply
#2
The ";" in a for loop control are part of the syntax for a //for// loop and not part of an "expression-statement".

Rule 14.3 only applies to "expression-statements" and therefore your for expression does not violate rule 14.3.
Posted by and on behalf of the MISRA C Working Group
Reply
#3
Ok, thank you.
<t></t>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)