FUNC-implicit-decl
In this section:
Synopsis
Functions are used without prototyping.
Enabled by default
No
Severity/Certainty
Medium/High

Full description
Functions are used without prototyping. Functions must be prototyped before use. This check is identical to MISRAC2004-8.1, MISRAC2012-Rule-17.3, CERT-DCL31-C.
Coding standards
- CERT DCL31-C
Declare identifiers before using them
- MISRA C:2004 8.1
(Required) Functions shall have prototype declarations and the prototype shall be visible at both the function definition and call.
- MISRA C:2012 Rule-17.3
(Mandatory) A function shall not be declared implicitly
Code examples
The following code example fails the check and will give a warning:
void func2(void)
{
func();
}
The following code example passes the check and will not give a warning about this issue:
void func(void);
void func2(void)
{
func();
}