[previous] 0449 [next] [C] Operand of ++/-- must not be a pointer to a function.
Constraint violations REFERENCE - ISO:C90-6.3.2.4 (Postfix), ISO:C90-6.3.3.1 (Prefix) Increment and Decrement Operators

This is a constraint error

A function pointer cannot be incremented or decremented. For example:


/*PRQA S 3408,3447,3672 ++*/

extern void (*fn_ptr)(void);

void foo (void)
{
   ++fn_ptr;                  /* Message 0449 */
}


MISRA C:2012 Rules applicable to message 0449:

Rule-1.1  (Required) The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits


QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents