Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
languagec
unsigned int value;

if (scanf("%d%u", &value) == 1) {
  if (value & 0x1 != 0) {
    /* Take action if value is odd */
  }
}

...

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
bitop-type
Partially checked
Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C2940, C2945 

DF2941, DF2942, DF2943, DF2946, DF2947, DF2948


LDRA tool suite
Include Page
LDRA_V
LDRA_V
50 S, 120 SPartially Implemented
Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V
CERT_C-INT16-a
Bitwise operators shall only be applied to operands of unsigned underlying type
PRQA QAPC-Clint Plus

Include Page
PRQA QAPC-Clint Plus_vVPRQA QA
PC-Clint Plus_vV

2940502, 2941, 2942, 2943, 2945, 2946, 2947, 29482704, 9088

Partially supported: reports bitwise not of signed quantity, declaration of named signed single-bit bitfields, and negation of the minimum negative integer

RuleChecker

Include Page
RuleChecker_V
RuleChecker_V

bitop-type
Partially checked

...