• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2013.11/share/doc/arm-arm-none-eabi/html/cpp/
1<html lang="en">
2<head>
3<title>The C Preprocessor</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="The C Preprocessor">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="#Top">
8<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9<!--
10Copyright (C) 1987-2013 Free Software Foundation, Inc.
11
12Permission is granted to copy, distribute and/or modify this document
13under the terms of the GNU Free Documentation License, Version 1.3 or
14any later version published by the Free Software Foundation.  A copy of
15the license is included in the
16section entitled "GNU Free Documentation License".
17
18This manual contains no Invariant Sections.  The Front-Cover Texts are
19(a) (see below), and the Back-Cover Texts are (b) (see below).
20
21(a) The FSF's Front-Cover Text is:
22
23     A GNU Manual
24
25(b) The FSF's Back-Cover Text is:
26
27     You have freedom to copy and modify this GNU Manual, like GNU
28     software.  Copies published by the Free Software Foundation raise
29     funds for GNU development.
30-->
31<meta http-equiv="Content-Style-Type" content="text/css">
32<style type="text/css"><!--
33  pre.display { font-family:inherit }
34  pre.format  { font-family:inherit }
35  pre.smalldisplay { font-family:inherit; font-size:smaller }
36  pre.smallformat  { font-family:inherit; font-size:smaller }
37  pre.smallexample { font-size:smaller }
38  pre.smalllisp    { font-size:smaller }
39  span.sc    { font-variant:small-caps }
40  span.roman { font-family:serif; font-weight:normal; } 
41  span.sansserif { font-family:sans-serif; font-weight:normal; } 
42--></style>
43<link rel="stylesheet" type="text/css" href="../cs.css">
44</head>
45<body>
46<h1 class="settitle">The C Preprocessor</h1>
47<div class="contents">
48<h2>Table of Contents</h2>
49<ul>
50<li><a name="toc_Top" href="index.html#Top">The C Preprocessor</a>
51<li><a name="toc_Overview" href="Overview.html#Overview">1 Overview</a>
52<ul>
53<li><a href="Character-sets.html#Character-sets">1.1 Character sets</a>
54<li><a href="Initial-processing.html#Initial-processing">1.2 Initial processing</a>
55<li><a href="Tokenization.html#Tokenization">1.3 Tokenization</a>
56<li><a href="The-preprocessing-language.html#The-preprocessing-language">1.4 The preprocessing language</a>
57</li></ul>
58<li><a name="toc_Header-Files" href="Header-Files.html#Header-Files">2 Header Files</a>
59<ul>
60<li><a href="Include-Syntax.html#Include-Syntax">2.1 Include Syntax</a>
61<li><a href="Include-Operation.html#Include-Operation">2.2 Include Operation</a>
62<li><a href="Search-Path.html#Search-Path">2.3 Search Path</a>
63<li><a href="Once_002dOnly-Headers.html#Once_002dOnly-Headers">2.4 Once-Only Headers</a>
64<li><a href="Alternatives-to-Wrapper-_0023ifndef.html#Alternatives-to-Wrapper-_0023ifndef">2.5 Alternatives to Wrapper #ifndef</a>
65<li><a href="Computed-Includes.html#Computed-Includes">2.6 Computed Includes</a>
66<li><a href="Wrapper-Headers.html#Wrapper-Headers">2.7 Wrapper Headers</a>
67<li><a href="System-Headers.html#System-Headers">2.8 System Headers</a>
68</li></ul>
69<li><a name="toc_Macros" href="Macros.html#Macros">3 Macros</a>
70<ul>
71<li><a href="Object_002dlike-Macros.html#Object_002dlike-Macros">3.1 Object-like Macros</a>
72<li><a href="Function_002dlike-Macros.html#Function_002dlike-Macros">3.2 Function-like Macros</a>
73<li><a href="Macro-Arguments.html#Macro-Arguments">3.3 Macro Arguments</a>
74<li><a href="Stringification.html#Stringification">3.4 Stringification</a>
75<li><a href="Concatenation.html#Concatenation">3.5 Concatenation</a>
76<li><a href="Variadic-Macros.html#Variadic-Macros">3.6 Variadic Macros</a>
77<li><a href="Predefined-Macros.html#Predefined-Macros">3.7 Predefined Macros</a>
78<ul>
79<li><a href="Standard-Predefined-Macros.html#Standard-Predefined-Macros">3.7.1 Standard Predefined Macros</a>
80<li><a href="Common-Predefined-Macros.html#Common-Predefined-Macros">3.7.2 Common Predefined Macros</a>
81<li><a href="System_002dspecific-Predefined-Macros.html#System_002dspecific-Predefined-Macros">3.7.3 System-specific Predefined Macros</a>
82<li><a href="C_002b_002b-Named-Operators.html#C_002b_002b-Named-Operators">3.7.4 C++ Named Operators</a>
83</li></ul>
84<li><a href="Undefining-and-Redefining-Macros.html#Undefining-and-Redefining-Macros">3.8 Undefining and Redefining Macros</a>
85<li><a href="Directives-Within-Macro-Arguments.html#Directives-Within-Macro-Arguments">3.9 Directives Within Macro Arguments</a>
86<li><a href="Macro-Pitfalls.html#Macro-Pitfalls">3.10 Macro Pitfalls</a>
87<ul>
88<li><a href="Misnesting.html#Misnesting">3.10.1 Misnesting</a>
89<li><a href="Operator-Precedence-Problems.html#Operator-Precedence-Problems">3.10.2 Operator Precedence Problems</a>
90<li><a href="Swallowing-the-Semicolon.html#Swallowing-the-Semicolon">3.10.3 Swallowing the Semicolon</a>
91<li><a href="Duplication-of-Side-Effects.html#Duplication-of-Side-Effects">3.10.4 Duplication of Side Effects</a>
92<li><a href="Self_002dReferential-Macros.html#Self_002dReferential-Macros">3.10.5 Self-Referential Macros</a>
93<li><a href="Argument-Prescan.html#Argument-Prescan">3.10.6 Argument Prescan</a>
94<li><a href="Newlines-in-Arguments.html#Newlines-in-Arguments">3.10.7 Newlines in Arguments</a>
95</li></ul>
96</li></ul>
97<li><a name="toc_Conditionals" href="Conditionals.html#Conditionals">4 Conditionals</a>
98<ul>
99<li><a href="Conditional-Uses.html#Conditional-Uses">4.1 Conditional Uses</a>
100<li><a href="Conditional-Syntax.html#Conditional-Syntax">4.2 Conditional Syntax</a>
101<ul>
102<li><a href="Ifdef.html#Ifdef">4.2.1 Ifdef</a>
103<li><a href="If.html#If">4.2.2 If</a>
104<li><a href="Defined.html#Defined">4.2.3 Defined</a>
105<li><a href="Else.html#Else">4.2.4 Else</a>
106<li><a href="Elif.html#Elif">4.2.5 Elif</a>
107</li></ul>
108<li><a href="Deleted-Code.html#Deleted-Code">4.3 Deleted Code</a>
109</li></ul>
110<li><a name="toc_Diagnostics" href="Diagnostics.html#Diagnostics">5 Diagnostics</a>
111<li><a name="toc_Line-Control" href="Line-Control.html#Line-Control">6 Line Control</a>
112<li><a name="toc_Pragmas" href="Pragmas.html#Pragmas">7 Pragmas</a>
113<li><a name="toc_Other-Directives" href="Other-Directives.html#Other-Directives">8 Other Directives</a>
114<li><a name="toc_Preprocessor-Output" href="Preprocessor-Output.html#Preprocessor-Output">9 Preprocessor Output</a>
115<li><a name="toc_Traditional-Mode" href="Traditional-Mode.html#Traditional-Mode">10 Traditional Mode</a>
116<ul>
117<li><a href="Traditional-lexical-analysis.html#Traditional-lexical-analysis">10.1 Traditional lexical analysis</a>
118<li><a href="Traditional-macros.html#Traditional-macros">10.2 Traditional macros</a>
119<li><a href="Traditional-miscellany.html#Traditional-miscellany">10.3 Traditional miscellany</a>
120<li><a href="Traditional-warnings.html#Traditional-warnings">10.4 Traditional warnings</a>
121</li></ul>
122<li><a name="toc_Implementation-Details" href="Implementation-Details.html#Implementation-Details">11 Implementation Details</a>
123<ul>
124<li><a href="Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">11.1 Implementation-defined behavior</a>
125<li><a href="Implementation-limits.html#Implementation-limits">11.2 Implementation limits</a>
126<li><a href="Obsolete-Features.html#Obsolete-Features">11.3 Obsolete Features</a>
127<ul>
128<li><a href="Obsolete-Features.html#Obsolete-Features">11.3.1 Assertions</a>
129</li></ul>
130<li><a href="Differences-from-previous-versions.html#Differences-from-previous-versions">11.4 Differences from previous versions</a>
131</li></ul>
132<li><a name="toc_Invocation" href="Invocation.html#Invocation">12 Invocation</a>
133<li><a name="toc_Environment-Variables" href="Environment-Variables.html#Environment-Variables">13 Environment Variables</a>
134<li><a name="toc_GNU-Free-Documentation-License" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>
135<ul>
136<li><a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">ADDENDUM: How to use this License for your documents</a>
137</li></ul>
138<li><a name="toc_Index-of-Directives" href="Index-of-Directives.html#Index-of-Directives">Index of Directives</a>
139<li><a name="toc_Option-Index" href="Option-Index.html#Option-Index">Option Index</a>
140<li><a name="toc_Concept-Index" href="Concept-Index.html#Concept-Index">Concept Index</a>
141</li></ul>
142</div>
143
144
145
146<div class="node">
147<a name="Top"></a>
148<p>
149Next:&nbsp;<a rel="next" accesskey="n" href="Overview.html#Overview">Overview</a>,
150Up:&nbsp;<a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
151<hr>
152</div>
153
154<h2 class="unnumbered">The C Preprocessor</h2>
155
156<p>The C preprocessor implements the macro language used to transform C,
157C++, and Objective-C programs before they are compiled.  It can also be
158useful on its own.
159
160<ul class="menu">
161<li><a accesskey="1" href="Overview.html#Overview">Overview</a>
162<li><a accesskey="2" href="Header-Files.html#Header-Files">Header Files</a>
163<li><a accesskey="3" href="Macros.html#Macros">Macros</a>
164<li><a accesskey="4" href="Conditionals.html#Conditionals">Conditionals</a>
165<li><a accesskey="5" href="Diagnostics.html#Diagnostics">Diagnostics</a>
166<li><a accesskey="6" href="Line-Control.html#Line-Control">Line Control</a>
167<li><a accesskey="7" href="Pragmas.html#Pragmas">Pragmas</a>
168<li><a accesskey="8" href="Other-Directives.html#Other-Directives">Other Directives</a>
169<li><a accesskey="9" href="Preprocessor-Output.html#Preprocessor-Output">Preprocessor Output</a>
170<li><a href="Traditional-Mode.html#Traditional-Mode">Traditional Mode</a>
171<li><a href="Implementation-Details.html#Implementation-Details">Implementation Details</a>
172<li><a href="Invocation.html#Invocation">Invocation</a>
173<li><a href="Environment-Variables.html#Environment-Variables">Environment Variables</a>
174<li><a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>
175<li><a href="Index-of-Directives.html#Index-of-Directives">Index of Directives</a>
176<li><a href="Option-Index.html#Option-Index">Option Index</a>
177<li><a href="Concept-Index.html#Concept-Index">Concept Index</a>
178
179</li></ul>
180<p>--- The Detailed Node Listing ---
181
182<p>Overview
183
184</p>
185<ul class="menu">
186<li><a href="Character-sets.html#Character-sets">Character sets</a>
187<li><a href="Initial-processing.html#Initial-processing">Initial processing</a>
188<li><a href="Tokenization.html#Tokenization">Tokenization</a>
189<li><a href="The-preprocessing-language.html#The-preprocessing-language">The preprocessing language</a>
190
191</li></ul>
192<p>Header Files
193
194</p>
195<ul class="menu">
196<li><a href="Include-Syntax.html#Include-Syntax">Include Syntax</a>
197<li><a href="Include-Operation.html#Include-Operation">Include Operation</a>
198<li><a href="Search-Path.html#Search-Path">Search Path</a>
199<li><a href="Once_002dOnly-Headers.html#Once_002dOnly-Headers">Once-Only Headers</a>
200<li><a href="Alternatives-to-Wrapper-_0023ifndef.html#Alternatives-to-Wrapper-_0023ifndef">Alternatives to Wrapper #ifndef</a>
201<li><a href="Computed-Includes.html#Computed-Includes">Computed Includes</a>
202<li><a href="Wrapper-Headers.html#Wrapper-Headers">Wrapper Headers</a>
203<li><a href="System-Headers.html#System-Headers">System Headers</a>
204
205</li></ul>
206<p>Macros
207
208</p>
209<ul class="menu">
210<li><a href="Object_002dlike-Macros.html#Object_002dlike-Macros">Object-like Macros</a>
211<li><a href="Function_002dlike-Macros.html#Function_002dlike-Macros">Function-like Macros</a>
212<li><a href="Macro-Arguments.html#Macro-Arguments">Macro Arguments</a>
213<li><a href="Stringification.html#Stringification">Stringification</a>
214<li><a href="Concatenation.html#Concatenation">Concatenation</a>
215<li><a href="Variadic-Macros.html#Variadic-Macros">Variadic Macros</a>
216<li><a href="Predefined-Macros.html#Predefined-Macros">Predefined Macros</a>
217<li><a href="Undefining-and-Redefining-Macros.html#Undefining-and-Redefining-Macros">Undefining and Redefining Macros</a>
218<li><a href="Directives-Within-Macro-Arguments.html#Directives-Within-Macro-Arguments">Directives Within Macro Arguments</a>
219<li><a href="Macro-Pitfalls.html#Macro-Pitfalls">Macro Pitfalls</a>
220
221</li></ul>
222<p>Predefined Macros
223
224</p>
225<ul class="menu">
226<li><a href="Standard-Predefined-Macros.html#Standard-Predefined-Macros">Standard Predefined Macros</a>
227<li><a href="Common-Predefined-Macros.html#Common-Predefined-Macros">Common Predefined Macros</a>
228<li><a href="System_002dspecific-Predefined-Macros.html#System_002dspecific-Predefined-Macros">System-specific Predefined Macros</a>
229<li><a href="C_002b_002b-Named-Operators.html#C_002b_002b-Named-Operators">C++ Named Operators</a>
230
231</li></ul>
232<p>Macro Pitfalls
233
234</p>
235<ul class="menu">
236<li><a href="Misnesting.html#Misnesting">Misnesting</a>
237<li><a href="Operator-Precedence-Problems.html#Operator-Precedence-Problems">Operator Precedence Problems</a>
238<li><a href="Swallowing-the-Semicolon.html#Swallowing-the-Semicolon">Swallowing the Semicolon</a>
239<li><a href="Duplication-of-Side-Effects.html#Duplication-of-Side-Effects">Duplication of Side Effects</a>
240<li><a href="Self_002dReferential-Macros.html#Self_002dReferential-Macros">Self-Referential Macros</a>
241<li><a href="Argument-Prescan.html#Argument-Prescan">Argument Prescan</a>
242<li><a href="Newlines-in-Arguments.html#Newlines-in-Arguments">Newlines in Arguments</a>
243
244</li></ul>
245<p>Conditionals
246
247</p>
248<ul class="menu">
249<li><a href="Conditional-Uses.html#Conditional-Uses">Conditional Uses</a>
250<li><a href="Conditional-Syntax.html#Conditional-Syntax">Conditional Syntax</a>
251<li><a href="Deleted-Code.html#Deleted-Code">Deleted Code</a>
252
253</li></ul>
254<p>Conditional Syntax
255
256</p>
257<ul class="menu">
258<li><a href="Ifdef.html#Ifdef">Ifdef</a>
259<li><a href="If.html#If">If</a>
260<li><a href="Defined.html#Defined">Defined</a>
261<li><a href="Else.html#Else">Else</a>
262<li><a href="Elif.html#Elif">Elif</a>
263
264</li></ul>
265<p>Implementation Details
266
267</p>
268<ul class="menu">
269<li><a href="Implementation_002ddefined-behavior.html#Implementation_002ddefined-behavior">Implementation-defined behavior</a>
270<li><a href="Implementation-limits.html#Implementation-limits">Implementation limits</a>
271<li><a href="Obsolete-Features.html#Obsolete-Features">Obsolete Features</a>
272<li><a href="Differences-from-previous-versions.html#Differences-from-previous-versions">Differences from previous versions</a>
273
274</li></ul>
275<p>Obsolete Features
276
277</p>
278<ul class="menu">
279<li><a href="Obsolete-Features.html#Obsolete-Features">Obsolete Features</a>
280
281   </ul>
282
283<!-- man begin COPYRIGHT -->
284   <p>Copyright &copy; 1987-2013 Free Software Foundation, Inc.
285
286   <p>Permission is granted to copy, distribute and/or modify this document
287under the terms of the GNU Free Documentation License, Version 1.3 or
288any later version published by the Free Software Foundation.  A copy of
289the license is included in the
290<!-- man end -->
291section entitled &ldquo;GNU Free Documentation License&rdquo;.
292
293<!-- man begin COPYRIGHT -->
294   <p>This manual contains no Invariant Sections.  The Front-Cover Texts are
295(a) (see below), and the Back-Cover Texts are (b) (see below).
296
297   <p>(a) The FSF's Front-Cover Text is:
298
299   <p>A GNU Manual
300
301   <p>(b) The FSF's Back-Cover Text is:
302
303   <p>You have freedom to copy and modify this GNU Manual, like GNU
304     software.  Copies published by the Free Software Foundation raise
305     funds for GNU development. 
306<!-- man end -->
307
308   </body></html>
309
310