The C Preprocessor: Macro Pitfalls

Previous: Directives Within Macro Arguments, Up: Macros   [Contents][Index]


3.10 Macro Pitfalls

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 counter-intuitive consequences that you must watch out for.

• Misnesting:   
• Operator Precedence Problems:   
• Swallowing the Semicolon:   
• Duplication of Side Effects:   
• Self-Referential Macros:   
• Argument Prescan:   
• Newlines in Arguments: