A macro argument is the preprocessing-token sequence supplied for a parameter in a function-like macro call. In BYTECOPY(A, B), A and B are separated by the comma outside any nested parentheses. section 16.1
Preprocessing handles macro arguments in a defined sequence:
- Scans parentheses and commas; nested parentheses keep commas inside one argument. section 16.1
- Requires the argument count to match the macro’s parameter count. section 16.1
- Recursively expands macros appearing inside each argument before substitution. section 16.1
- Substitutes the resulting fragments into copied replacement text, which is then expanded again. section 16.1
Nested argument expansion
Given BYTECOPY(A, B), if A expands to redA, preprocessing can produce memcpy(&(redA), &(B), ...). The argument A is expanded before it replaces the corresponding parameter. section 16.1
