![]() |
![]() |
3454 | ![]() |
||||
![]() | |||||||
| Preprocessing | |||||||
This macro argument includes an increment, decrement or assignment operator. These are operators that generate side effects and there are several reasons why it is unwise to invoke a macro with an argument that induces side effects.
/*PRQA S 3199,3408,3429,3440,3447,3453 ++ */
#define MAC1(X) ((X) * foo(2))
extern int foo(int p);
extern int g;
extern void func(int sia)
{
g = MAC1(sia++); /* Message 3454 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |