Versions Compared

Key

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

...

Tool

Version

Checker

Description

Coverity

Include Page
Coverity_V
Coverity_V

DEADCODE


UNREACHABLE

Can detect the specific instance where code can never be reached because of a logical contradiction or a dead "default" in switch statement.

Can detect the instances where code block is unreachable because of the syntactic structure of the code.

GCC

Include Page
GCC_V
GCC_V

 

Can detect violations of this recommendation when the -Wunreachable-code flag is used.

Klocwork

Include Page
Klocwork_V
Klocwork_V

LV_UNUSED.GEN VA_UNUSED.* UNREACH.*

 

LDRA tool suite

Include Page
LDRA_V
LDRA_V

1 J
139 S
140 S

Fully implemented.

PRQA QA-C
Include Page
PRQA_V
PRQA_V

0689
2008
3110
3112
3196
3201
3202
3203
3205
3206
3207
3210
3219
3229
3307
3328
3355
3356
3357
3358
3359
3360
3404
3422
3423
3425
3426
3427
3470

Fully implemented.

Splint

Include Page
Splint_V
Splint_V

 

Can detect violations of this recommendation when the -Wunreachable-code flag is used.

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...

CERT C++ Secure Coding StandardMSC07-CPP. Detect and remove dead code
ISO/IEC TR 24772Leveraging human experience [BRS]
Unspecified functionality [BVQ]
Dead and deactivated code [XYQ]
MISRA - C:2012Rule 2Directive 4.4 (advisory)
MITRE CWECWE-561, Dead code

...