When defining macros, put parentheses around all variable names. This ensures that the macro is evaluated in a predictable manner.
Non-
...
Compliant Code Example
Code Block |
---|
#define PRODUCT(A,B) A * B int a = PRODUCT(3+4, 5) |
...
When defining macros, put parentheses around all variable names. This ensures that the macro is evaluated in a predictable manner.
...
Code Block |
---|
#define PRODUCT(A,B) A * B int a = PRODUCT(3+4, 5) |
...