...
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 |
| type-specifier function-return-type implicit-function-declaration | Fully checked | ||||||
Clang |
| -Wimplicit-int |
Compass/ROSE |
Coverity |
| MISRA C 2012 Rule 8.1 | Implemented | ||||||
| CC2.DCL31 | Fully implemented | |||||||
GCC |
|
Can detect violations of this rule when the | ||||||||
Klocwork |
| CWARN.IMPLICITINT RETVOID.IMPLICIT |
LDRA tool suite |
| 24 D, 41 D, 20 S, 326 S, 496 S | Fully implemented | ||||||
Parasoft C/C++test |
|
|
| MISRA-020 | Partially implemented | |||||||
Polyspace Bug Finder | R2016a | MISRA2012-RULE-8_1, MISRA2012-RULE-17_3 | Full | ||||||
PRQA QA-C |
| 0434 (C) | Fully implemented | ||||||
SonarQube C/C++ Plugin |
| S819, S820 | Partially implemented; implicit return type not covered. | ||||||
RuleChecker |
| 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 Standard | DCL07-C. Include the appropriate type information in function declarators | Prior to 2018-01-12: CERT: Unspecified Relationship |
ISO/IEC TR 24772:2013 | Subprogram Signature Mismatch [OTR] | Prior to 2018-01-12: CERT: Unspecified Relationship |
MISRA C:2012 | Rule 8.1 (required) | Prior to 2018-01-12: CERT: Unspecified Relationship |
Bibliography
...
...