www.delorie.com/gnu/docs/gcc/cpp.html   search  
 
Buy the book!


The C Preprocessor

[Top] [Contents] [Index] [ ? ]

The C Preprocessor

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.

1. Overview  
2. Header Files  
3. Macros  
4. Conditionals  
5. Diagnostics  
6. Line Control  
7. Pragmas  
8. Other Directives  
9. Preprocessor Output  
10. Traditional Mode  
11. Implementation Details  
12. Invocation  
13. Environment Variables  
GNU Free Documentation License  
Option Index  
Index of Directives  
Concept Index  

 -- The Detailed Node Listing ---

Overview

1.1 Initial processing  
1.2 Tokenization  
1.3 The preprocessing language  

Header Files

2.1 Include Syntax  
2.2 Include Operation  
2.3 Search Path  
2.4 Once-Only Headers  
2.5 Computed Includes  
2.6 Wrapper Headers  
2.7 System Headers  

Macros

3.1 Object-like Macros  
3.2 Function-like Macros  
3.3 Macro Arguments  
3.4 Stringification  
3.5 Concatenation  
3.6 Variadic Macros  
3.7 Predefined Macros  
3.8 Undefining and Redefining Macros  
3.9 Macro Pitfalls  

Predefined Macros

3.7.1 Standard Predefined Macros  
3.7.2 Common Predefined Macros  
3.7.3 System-specific Predefined Macros  
3.7.4 C++ Named Operators  

Macro Pitfalls

3.9.1 Misnesting  
3.9.2 Operator Precedence Problems  
3.9.3 Swallowing the Semicolon  
3.9.4 Duplication of Side Effects  
3.9.5 Self-Referential Macros  
3.9.6 Argument Prescan  
3.9.7 Newlines in Arguments  

Conditionals

4.1 Conditional Uses  
4.2 Conditional Syntax  
4.3 Deleted Code  

Conditional Syntax

4.2.1 Ifdef  
4.2.2 If  
4.2.3 Defined  
4.2.4 Else  
4.2.5 Elif  

Implementation Details

11.1 Implementation-defined behavior  
11.2 Implementation limits  
11.3 Obsolete Features  
11.4 Differences from previous versions  

Obsolete Features

11.3.1 Assertions  
11.3.2 Obsolete once-only headers  
11.3.3 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.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003