[previous] 0349 [next] Using the unary '+' operator.
K+R compatibility REFERENCE - ISO:C90-6.3.3.3 Unary Arithmetic Operators

A unary '+' operator is being used. This operator was not supported in early versions of the C language and it only exists to provide symmetry with the unary '-' operator.

Be aware that message 0349 is only generated when the "-k+r u" option is enabled. Messages 0349 and 3600 are functionally equivalent. When the "-k+r u" option is enabled, message 3600 is no longer generated.

For example:


/*PRQA S 2017,2213,3132,3206,3211,3408,3674 ++*/
/*****************************
 * OPTIONS: -k+r u
 ****************************/

int swt[][3] =
{
    { -1,-1,+1 },                       /* Message 0349 */
    { -1,-1,-1 },
    { +1,+1,+1 }                        /* Message 0349 0349 0349 */
};

See also:

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