Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: match bold fonts

...

Because implicit declarations lead to less stringent type checking, they can introduce unexpected and erroneous behavior. Occurrences of an omitted type specifier in existing code are rare, and the consequences are generally minor, perhaps resulting in abnormal program termination.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DCL31-C

Low

Unlikely

Low

P3

L3

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V

type-specifier

function-return-type

implicit-function-declaration

Fully checked
Clang
Include Page
Clang_V
Clang_V
-Wimplicit-int
 

Compass/ROSE
 

 

 




Coverity
Include Page
Coverity_V
Coverity_V
MISRA C 2012 Rule 8.1Implemented

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

CC2.DCL31

Fully implemented

GCC
Include Page
GCC_V
GCC_V

 


Can detect violations of this rule when the -Wimplicit and -Wreturn-type flags are used

Klocwork
Include Page
Klocwork_V
Klocwork_V

CWARN.IMPLICITINT
FUNCRET.IMPLICIT
MISRA.DECL.NO_TYPE

MISRA.FUNC.NOPROT.CALL
RETVOID.IMPLICIT
 


LDRA tool suite
Include Page
LDRA_V
LDRA_V

24 D, 41 D, 20 S, 326 S, 496 S

Fully implemented

Parasoft C/C++test
Include Page
c:
Parasoft_V
c:
Parasoft_V
MISRA-020Partially implemented
Polyspace Bug FinderR2016aMISRA2012-RULE-8_1, MISRA2012-RULE-17_3  Full
PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v

0434 (C)
1302
2050
2051
3335

Fully implemented
SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
S819, S820  Partially implemented; implicit return type not covered.
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V

type-specifier

function-return-type

implicit-function-declaration

Fully checked

Related Vulnerabilities

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

...

Key here (explains table format and definitions)

Taxonomy

Taxonomy item

Relationship

CERT C Secure Coding StandardDCL07-C. Include the appropriate type information in function declaratorsPrior to 2018-01-12: CERT: Unspecified Relationship
ISO/IEC TR 24772:2013Subprogram Signature Mismatch [OTR]Prior to 2018-01-12: CERT: Unspecified Relationship
MISRA C:2012Rule 8.1 (required)Prior to 2018-01-12: CERT: Unspecified Relationship

Bibliography

[ISO/IEC 9899:1990]
 

[ISO/IEC 9899:2011]Subclause 6.7.2, "Type Specifiers"
[Jones 2008]
 

...



...