[previous] 0551 [next] [E] Cast may not operate on the left operand of the assignment operator.
Language extensions

A cast has been applied to the left hand side of an assignment operation. This is a language extension. QAC is able to parse this syntax but does not interpret the semantics.

For example:


/*PRQA S 1257,2017,3120,3195,3199,3203,3408,3625 ++*/

extern void foo(char p)
{
    (unsigned int)p = 0x12u;          /* Message 0551 */
}


MISRA C:2012 Rules applicable to message 0551:

Rule-1.2  (Advisory) Language extensions should not be used


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