[previous] 0466 [next] [C] Unary '+' requires arithmetic operand.
Constraint violations REFERENCE - ISO:C90-6.3.3.3 Unary Arithmetic Operators - Constraints

This is a constraint error

The operand of the unary '+' operator must be of arithmetic type. Check the type of the operand. For example:


/*PRQA S 2213,3408,3447,3600,3617 ++*/


struct ST { int x; };

extern struct ST field1;
extern struct ST field2;

extern int *p1;
extern int *p2;

void foo(void)
{
    field2 = +field1;               /* Message 0466 */
    p2 = +p1;                       /* Message 0466 */

}

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents