Versions Compared

Key

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

...

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
assignment-conditionalFully checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-EXP45
Clang
Include Page
Clang_V
Clang_V
-WparenthesesCan detect some instances of this rule, but does not detect all
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
LANG.STRUCT.CONDASSIG
LANG.STRUCT.SE.COND
LANG.STRUCT.USEASSIGN
Assignment in conditional
Condition contains side effects
Assignment result in expression
Compass/ROSE



Could detect violations of this recommendation by identifying any assignment expression as the top-level expression in an if or while statement

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.EXP18
CC2.EXP21

Fully implemented

GCC
Include Page
GCC_V
GCC_V


Can detect violations of this recommendation when the -Wall flag is used

Klocwork
Include Page
Klocwork_V
Klocwork_V

ASSIGCOND.CALL
ASSIGCOND.GEN
MISRA.ASSIGN.COND


LDRA tool suite
Include Page
LDRA_V
LDRA_V

114 S, 132 S

Enhanced Enforcement
Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V

CERT_C-EXP45-a
CERT_C-EXP45-b
CERT_C-EXP45-c
CERT_C-EXP45-d

Avoid conditions that always evaluate to the same value
Assignment operators shall not be used in conditions without brackets
A function identifier shall only be used with either a preceding '&', or with a parenthesised parameter list, which may be empty
Assignment operators shall not be used in expressions that yield a Boolean value

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

Invalid CERT C: Rule EXP45-CChecks for invalid use of = (assignment) operator Assignment in conditional statement(rule partially covered)
PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v
3314, 3326, 3344, 3416Partially implemented
PRQA QA-C++

Include Page
cplusplus:PRQA QA-C++_V
cplusplus:PRQA QA-C++_V

4071, 4074 
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V559, V633, V699
RuleChecker

Include Page
RuleChecker_V
RuleChecker_V

assignment-conditionalFully checked
SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
AssignmentInSubExpression

...