[previous] MISRA-C:2004  Rule  16.9:  (Required) [next] A function identifier shall only be used with either a preceding &, or with a parenthesised parameter list, which may be empty.
If the programmer writes:

if ( f )    /* not compliant - gives a constant non-zero value which is
  {            the address of f - use either f() or &f                  */
    /* ... */
}

then it is not clear if the intent is to test if the address of the function is not NULL or that a call to the function f() should be made.


QAC messages that encompass this guideline:

3635 Function identifier used as a pointer without a preceding & operator.



(c) The Motor Industry Research Association, 2004
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents