The C preprocessor implements the macro language used to transform C, C++, and Objective-C programs before they are compiled. It can also be useful on its own.
Overview
| Initial processing | |
| Tokenization | |
| The preprocessing language | |
Header Files
| Include Syntax | |
| Include Operation | |
| Search Path | |
| Once-Only Headers | |
| Computed Includes | |
| Wrapper Headers | |
| System Headers | |
Macros
| Object-like Macros | |
| Function-like Macros | |
| Macro Arguments | |
| Stringification | |
| Concatenation | |
| Variadic Macros | |
| Predefined Macros | |
| Undefining and Redefining Macros | |
| Macro Pitfalls | |
Predefined Macros
| Standard Predefined Macros | |
| Common Predefined Macros | |
| System-specific Predefined Macros | |
| C++ Named Operators | |
Macro Pitfalls
| Misnesting | |
| Operator Precedence Problems | |
| Swallowing the Semicolon | |
| Duplication of Side Effects | |
| Self-Referential Macros | |
| Argument Prescan | |
| Newlines in Arguments | |
Conditionals
| Conditional Uses | |
| Conditional Syntax | |
| Deleted Code | |
Conditional Syntax
| Ifdef | |
| If | |
| Defined | |
| Else | |
| Elif | |
Implementation Details
| Implementation-defined behavior | |
| Implementation limits | |
| Obsolete Features | |
| Differences from previous versions | |
Obsolete Features
| Assertions | |
| Obsolete once-only headers | |
| Miscellaneous obsolete features | |