[previous] 0447 [next] [C] Operand of ++/-- must be a modifiable object.
Constraint violations REFERENCE - ISO:C90-6.3.2.4 (Postfix), ISO:C90-6.3.3.1 (Prefix) Increment and Decrement Operators

This is a constraint error

The operand of a ++ or -- operator (either prefix or postfix) must be a modifiable lvalue. For example:


/*PRQA S 506,3132,3408,3447,3602 ++*/

extern        int x[10];
extern const  int y;

void foo(void)
{
    ++x;                        /* Message 0447 */
    ++y;                        /* Message 0447 */
}


MISRA C:2012 Rules applicable to message 0447:

Rule-1.1  (Required) The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits


QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents