...
Failing to include type information for function declarators can result in unexpected or unintended program behavior.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
DCL07-C | Low | Unlikely | Low | P3 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Astrée |
| function-prototype implicit-function-declaration | Partially checked | ||||||
CodeSonar |
| LANG.FUNCS.PROT | Incomplete function prototype | ||||||
| CC2.DCL07 | Fully implemented | |||||||
GCC |
|
Can detect violation of this recommendation when the | ||||||||
Klocwork |
| MISRA.FUNC.PROT_FORM.KR.2012 MISRA.FUNC.NOPROT.DEF MISRA.CAST.FUNC_PTR.2012 |
LDRA tool suite |
| 21 S | Fully implemented | ||||||
Polyspace Bug Finder | R2014b | Function types shall be in prototype form with named parameters Conversions shall not be performed between a pointer to a function and any other type | |||||||
PRQA QA-C |
| 1304 2050 3335 3408 | Fully implemented | ||||||
RuleChecker |
| function-prototype implicit-function-declaration | Partially checked | ||||||
SonarQube C/C++ Plugin |
| S819, S930 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
ISO/IEC TR 24772:2013 | Type System [IHN] Subprogram Signature Mismatch [OTR] |
ISO/IEC TS 17961 | Using a tainted value as an argument to an unprototyped function pointer [taintnoproto] |
MISRA C:2012 | Rule 8.2 (required) |
Bibliography
[ISO/IEC 9899:2011] | Subclause 6.11.7, "Function Definitions" |
[Spinellis 2006] | Section 2.6.1, "Incorrect Routine or Arguments" |
...
...