Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

Failing to ensure that constants within an enumeration have unique values can result in unexpected results.

Recommendation

Severity

Likelihood

Remediation Cost

Detectable

Repairable

Priority

Level

INT09-C

Low

Probable

Yes

Medium

No

P4

L3

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
enum-implicit-valueFully checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC-INT09
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
LANG.STRUCT.INIT.ENUMInconsistent Enumerator Initialization
Compass/ROSE

 

 

 




ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.INT09

Fully implemented

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C0724
Klocwork
Include Page
Klocwork_V
Klocwork_V
MISRA.ENUM.IMPLICIT.VAL.NON_UNIQUE.2012
 

LDRA tool suite
Include Page
LDRA_V
LDRA_V

85 S, 630 S

Fully implemented

Parasoft C/C++test
9.5MISRA2004-9_3Fully implementedPRQA QA-C Include PagePRQA QA-C_vPRQA QA-C_v

0724

Include Page
Parasoft_V
Parasoft_V

CERT_C-INT09-a

In an enumerator list, the "=" construct shall not be used to explicitly initialise members other than the first, unless all items are explicitly initialised

PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

488, 9148

Partially supported

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rec. INT09-C

Checks for situations where enumeration constants map to same value (rec. fully covered)

RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
enum-implicit-valueFully checked
Fully implemented

Related Vulnerabilities

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

Related Guidelines

...


...

Image Modified Image Modified Image Modified