MISRAC++2008-8-4-4
In this section:
Synopsis
(Required) A function identifier shall either be used to call the function or it shall be preceded by &.
Enabled by default
Yes
Severity/Certainty
Low/High

Full description
The addresses of one or more functions are taken without an explicit &. This check is identical to MISRAC2004-16.9.
Coding standards
- MISRA C:2004 16.9
(Required) A function identifier shall only be used with either a preceding &, or with a parenthesized parameter list, which may be empty.
Code examples
The following code example fails the check and will give a warning:
void func(void);
void
example(void)
{
void (*pf)(void) = func;
}
The following code example passes the check and will not give a warning about this issue:
void func(void);
void
example(void)
{
void (*pf)(void) = &func;
}