include::../description.adoc[]

include::../noncompliant.adoc[]

include::../compliant.adoc[]

== Exceptions

Assignments explicitly enclosed in parentheses are ignored.

----
while ((run = keepRunning())) {
  //...
}
----

== See

* MISRA C:2004, 13.1 - Assignment operators shall not be used in expressions that yield a Boolean value
* MISRA {cpp}:2008, 6-2-1 - Assignment operators shall not be used in sub-expressions
* MISRA C:2012, 13.4 - The result of an assignment operator should not be used
* http://cwe.mitre.org/data/definitions/481.html[MITRE, CWE-481] - Assigning instead of Comparing
* https://wiki.sei.cmu.edu/confluence/x/ZNYxBQ[CERT, EXP45-C.] - Do not perform assignments in selection statements
* https://wiki.sei.cmu.edu/confluence/x/ITZGBQ[CERT, EXP51-J.] - Do not perform assignments in conditional expressions

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
