The C Preprocessor
Last revised July 1992
for GCC version 2
Richard M. Stallman
The C Preprocessor
Transformations Made Globally
Preprocessor Commands
Header Files
Uses of Header Files
The
`#include'
Command
How
`#include'
Works
Once-Only Include Files
Inheritance and Header Files
Macros
Simple Macros
Macros with Arguments
Predefined Macros
Standard Predefined Macros
Nonstandard Predefined Macros
Stringification
Concatenation
Undefining Macros
Redefining Macros
Pitfalls and Subtleties of Macros
Improperly Nested Constructs
Unintended Grouping of Arithmetic
Swallowing the Semicolon
Duplication of Side Effects
Self-Referential Macros
Separate Expansion of Macro Arguments
Cascaded Use of Macros
Newlines in Macro Arguments
Conditionals
Why Conditionals are Used
Syntax of Conditionals
The
`#if'
Command
The
`#else'
Command
The
`#elif'
Command
Keeping Deleted Code for Future Reference
Conditionals and Macros
Assertions
The
`#error'
and
`#warning'
Commands
Combining Source Files
Miscellaneous Preprocessor Commands
C Preprocessor Output
Invoking the C Preprocessor
Concept Index
Index of Commands, Macros and Options