The C Preprocessor

Table of Contents


Next: Overview, Up: (dir)   [Contents][Index]


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:

  

Header Files:

  

Macros:

  

Conditionals:

  

Diagnostics:

  

Line Control:

  

Pragmas:

  

Other Directives:

  

Preprocessor Output:

  

Traditional Mode:

  

Implementation Details:

  

Invocation:

  

Environment Variables:

  

GNU Free Documentation License:

  

Index of Directives:

  

Option Index:

  

Concept Index:

  

Character sets:

  

Initial processing:

  

Tokenization:

  

The preprocessing language:

  

Include Syntax:

  

Include Operation:

  

Search Path:

  

Once-Only Headers:

  

Alternatives to Wrapper #ifndef:

  

Computed Includes:

  

Wrapper Headers:

  

System Headers:

  

Object-like Macros:

  

Function-like Macros:

  

Macro Arguments:

  

Stringizing:

  

Concatenation:

  

Variadic Macros:

  

Predefined Macros:

  

Undefining and Redefining Macros:

  

Directives Within Macro Arguments:

  

Macro Pitfalls:

  

Standard Predefined Macros:

  

Common Predefined Macros:

  

System-specific Predefined Macros:

  

C++ Named Operators:

  

Misnesting:

  

Operator Precedence Problems:

  

Swallowing the Semicolon:

  

Duplication of Side Effects:

  

Self-Referential Macros:

  

Argument Prescan:

  

Newlines in Arguments:

  

Conditional Uses:

  

Conditional Syntax:

  

Deleted Code:

  

Ifdef:

  

If:

  

Defined:

  

Else:

  

Elif:

  

Implementation-defined behavior:

  

Implementation limits:

  

Obsolete Features:

  

Obsolete Features:

  

Copyright © 1987-2020 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.3 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.

Next: Overview, Up: (dir)   [Contents][Index]