Wiki Markup |
---|
Parenthesize all variable names in macro definitions. See also \[[PRE00-A. Prefer inline functions to macros]\] and \[[PRE02-A. Macro expansion should always be parenthesized for function-like macros]\]. |
Non-Compliant Code Example (macros)
This CUBE()
macro definition is non-compliant because it fails to parenthesize the variable names.
...
Which is clearly not the desired result.
Compliant Solution (macros)
Parenthesizing all variable names in the CUBE()
macro allows it to expand correctly (when invoked in this manner).
...