[previous] 4512 [next] An expression of 'essentially character' type (%1s) is being used as the %2s operand of this bitwise operator (%3s).
Arithmetic type - Operands

This message is issued whenever an expression of essentially character type has been used as an operand of a bitwise operator.

For example:


/*PRQA S 1-9999 ++*/
/*PRQA S 4512-4514 --*/

void f4512 (char a)
{
  a & 1u;                   /* 4512 */
  
  a | 1u;                   /* 4512 */
  
  ~a;                       /* 4512 */

  a >> 1u;                  /* 4513 */

  1u << a;                  /* 4514 */
}

See also:

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