[previous] 0495 [next] [C] Left operand of '%', '<<', '>>', '&', '^' or '|' must have integral type.
Constraint violations REFERENCE - ISO:C90-6.3.5, ISO:C90-6.3.7, ISO:C90-6.3.10, ISO:C90-6.3.11, ISO:C90-6.3.12

This is a constraint error

The left hand operand of the %,  <<,  >>,  &,  ^ and | operators must be of integral type.

For example:


/*PRQA S 1278,3120,3198,3199,3203,3227,3408,4131 ++*/

void foo(float t)
{
    int n;

    n = t << 2;       /* Message 0495 */
    n = t % 2;        /* Message 0495 */
}

See also:

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