The comma operator takes two expressions, executes them from left to right and returns the result of the second one. Use of this operator is generally detrimental to the readability and reliability of code, and the same effect can be achieved by other means.

## Noncompliant Code Example

    i = a += 2, a + b;  // What's the value of i ?

## Compliant Solution

    a +=  2;
    i = a + b;

## Exceptions

Use of comma operator is tolerated in initialization and increment expressions of `for` loops.

    for(i = 0, j = 5; i < 6; i++, j++) { ... }

## See

- MISRA C:2004, 12.10 - The comma operator shall not be used.
- MISRA C++:2008, 5-18-1 - The comma operator shall not be used.
- MISRA C:2012, 12.3 - The comma operator should not be used