Versions Compared

Key

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

...

For more information on function declarations, see DCL07-C. Include the appropriate type information in function declarators.

Noncompliant Code Example (Implicit Return Type)

...

Tool

Version

Checker

Description

GCC

Include Page
GCC_V
GCC_V

 

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

Compass/ROSE

 

 

 

Klocwork

Include Page
Klocwork_V
Klocwork_V

IF_MISS_DECL RETVOID.IMPLICIT

 

LDRA tool suite

Include Page
LDRA_V
LDRA_V

24 D
20 S
326 S

Fully implemented.

ECLAIR

Include Page
ECLAIR_V
ECLAIR_V

decltype

Fully implemented.

PRQA QA-C
Include Page
PRQA_V
PRQA_V
 0434 (C)Fully implemented
  1302 
  2050 
  2051 
  3335 

Related Vulnerabilities

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

...

ISO/IEC 9899:2011 Section 6.7.2, "Type specifiers," and section 6.5.2.2, "Function calls"

ISO/IEC TR 24772 "OTR Subprogram signature mismatch"

MISRA

Sources

Jones 2008

...