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.

Menu

Overview
Header Files
Macros
Conditionals
Diagnostics
Line Control
Pragmas
Other Directives
Preprocessor Output
Traditional Mode
Implementation Details
Invocation
Environment Variables
GNU Free Documentation License
Option Index
Index of Directives
Concept Index
--- The Detailed Node Listing ---

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
Copyright (C) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,

1998, 1999, 2000, 2001 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document

under the terms of the GNU Free Documentation License, Version 1.1 or

any later version published by the Free Software Foundation. A copy of

the license is included in the section entitled "GNU Free Documentation

License". This manual contains no Invariant Sections. The Front-Cover Texts

are (a) (see below), and the Back-Cover Texts are (b) (see below). (a) The FSF's Front-Cover Text is: A GNU Manual (b) The FSF's Back-Cover Text is: You have freedom to copy and modify this GNU Manual, like GNU

software. Copies published by the Free Software Foundation raise funds

for GNU development.