Go to the first, previous, next, last section, table of contents.
In this section we describe some special rules that apply to macros and
macro expansion, and point out certain cases in which the rules have
counterintuitive consequences that you must watch out for.
- Misnesting: Macros can contain unmatched parentheses.
- Macro Parentheses: Why apparently superfluous parentheses
may be necessary to avoid incorrect grouping.
- Swallow Semicolon: Macros that look like functions
but expand into compound statements.
- Side Effects: Unsafe macros that cause trouble when
arguments contain side effects.
- Self-Reference: Macros whose definitions use the macros' own names.
- Argument Prescan: Actual arguments are checked for macro calls
before they are substituted.
- Cascaded Macros: Macros whose definitions use other macros.
- Newlines in Args: Sometimes line numbers get confused.
Go to the first, previous, next, last section, table of contents.