OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [share/] [man/] [man1/] [or1knd-elf-cpp.1] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 ultra_embe
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
2
.\"
3
.\" Standard preamble:
4
.\" ========================================================================
5
.de Sp \" Vertical space (when we can't use .PP)
6
.if t .sp .5v
7
.if n .sp
8
..
9
.de Vb \" Begin verbatim text
10
.ft CW
11
.nf
12
.ne \\$1
13
..
14
.de Ve \" End verbatim text
15
.ft R
16
.fi
17
..
18
.\" Set up some character translations and predefined strings.  \*(-- will
19
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23
.\" nothing in troff, for use with C<>.
24
.tr \(*W-
25
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26
.ie n \{\
27
.    ds -- \(*W-
28
.    ds PI pi
29
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31
.    ds L" ""
32
.    ds R" ""
33
.    ds C` ""
34
.    ds C' ""
35
'br\}
36
.el\{\
37
.    ds -- \|\(em\|
38
.    ds PI \(*p
39
.    ds L" ``
40
.    ds R" ''
41
'br\}
42
.\"
43
.\" Escape single quotes in literal strings from groff's Unicode transform.
44
.ie \n(.g .ds Aq \(aq
45
.el       .ds Aq '
46
.\"
47
.\" If the F register is turned on, we'll generate index entries on stderr for
48
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49
.\" entries marked with X<> in POD.  Of course, you'll have to process the
50
.\" output yourself in some meaningful fashion.
51
.ie \nF \{\
52
.    de IX
53
.    tm Index:\\$1\t\\n%\t"\\$2"
54
..
55
.    nr % 0
56
.    rr F
57
.\}
58
.el \{\
59
.    de IX
60
..
61
.\}
62
.\"
63
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
65
.    \" fudge factors for nroff and troff
66
.if n \{\
67
.    ds #H 0
68
.    ds #V .8m
69
.    ds #F .3m
70
.    ds #[ \f1
71
.    ds #] \fP
72
.\}
73
.if t \{\
74
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75
.    ds #V .6m
76
.    ds #F 0
77
.    ds #[ \&
78
.    ds #] \&
79
.\}
80
.    \" simple accents for nroff and troff
81
.if n \{\
82
.    ds ' \&
83
.    ds ` \&
84
.    ds ^ \&
85
.    ds , \&
86
.    ds ~ ~
87
.    ds /
88
.\}
89
.if t \{\
90
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96
.\}
97
.    \" troff and (daisy-wheel) nroff accents
98
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105
.ds ae a\h'-(\w'a'u*4/10)'e
106
.ds Ae A\h'-(\w'A'u*4/10)'E
107
.    \" corrections for vroff
108
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110
.    \" for low resolution devices (crt and lpr)
111
.if \n(.H>23 .if \n(.V>19 \
112
\{\
113
.    ds : e
114
.    ds 8 ss
115
.    ds o a
116
.    ds d- d\h'-1'\(ga
117
.    ds D- D\h'-1'\(hy
118
.    ds th \o'bp'
119
.    ds Th \o'LP'
120
.    ds ae ae
121
.    ds Ae AE
122
.\}
123
.rm #[ #] #H #V #F C
124
.\" ========================================================================
125
.\"
126
.IX Title "CPP 1"
127
.TH CPP 1 "2012-11-29" "gcc-4.8.0" "GNU"
128
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
129
.\" way too many mistakes in technical documents.
130
.if n .ad l
131
.nh
132
.SH "NAME"
133
cpp \- The C Preprocessor
134
.SH "SYNOPSIS"
135
.IX Header "SYNOPSIS"
136
cpp [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
137
    [\fB\-I\fR\fIdir\fR...] [\fB\-iquote\fR\fIdir\fR...]
138
    [\fB\-W\fR\fIwarn\fR...]
139
    [\fB\-M\fR|\fB\-MM\fR] [\fB\-MG\fR] [\fB\-MF\fR \fIfilename\fR]
140
    [\fB\-MP\fR] [\fB\-MQ\fR \fItarget\fR...]
141
    [\fB\-MT\fR \fItarget\fR...]
142
    [\fB\-P\fR] [\fB\-fno\-working\-directory\fR]
143
    [\fB\-x\fR \fIlanguage\fR] [\fB\-std=\fR\fIstandard\fR]
144
    \fIinfile\fR \fIoutfile\fR
145
.PP
146
Only the most useful options are listed here; see below for the remainder.
147
.SH "DESCRIPTION"
148
.IX Header "DESCRIPTION"
149
The C preprocessor, often known as \fIcpp\fR, is a \fImacro processor\fR
150
that is used automatically by the C compiler to transform your program
151
before compilation.  It is called a macro processor because it allows
152
you to define \fImacros\fR, which are brief abbreviations for longer
153
constructs.
154
.PP
155
The C preprocessor is intended to be used only with C, \*(C+, and
156
Objective-C source code.  In the past, it has been abused as a general
157
text processor.  It will choke on input which does not obey C's lexical
158
rules.  For example, apostrophes will be interpreted as the beginning of
159
character constants, and cause errors.  Also, you cannot rely on it
160
preserving characteristics of the input which are not significant to
161
C\-family languages.  If a Makefile is preprocessed, all the hard tabs
162
will be removed, and the Makefile will not work.
163
.PP
164
Having said that, you can often get away with using cpp on things which
165
are not C.  Other Algol-ish programming languages are often safe
166
(Pascal, Ada, etc.) So is assembly, with caution.  \fB\-traditional\-cpp\fR
167
mode preserves more white space, and is otherwise more permissive.  Many
168
of the problems can be avoided by writing C or \*(C+ style comments
169
instead of native language comments, and keeping macros simple.
170
.PP
171
Wherever possible, you should use a preprocessor geared to the language
172
you are writing in.  Modern versions of the \s-1GNU\s0 assembler have macro
173
facilities.  Most high level programming languages have their own
174
conditional compilation and inclusion mechanism.  If all else fails,
175
try a true general text processor, such as \s-1GNU\s0 M4.
176
.PP
177
C preprocessors vary in some details.  This manual discusses the \s-1GNU\s0 C
178
preprocessor, which provides a small superset of the features of \s-1ISO\s0
179
Standard C.  In its default mode, the \s-1GNU\s0 C preprocessor does not do a
180
few things required by the standard.  These are features which are
181
rarely, if ever, used, and may cause surprising changes to the meaning
182
of a program which does not expect them.  To get strict \s-1ISO\s0 Standard C,
183
you should use the \fB\-std=c90\fR, \fB\-std=c99\fR or
184
\&\fB\-std=c11\fR options, depending
185
on which version of the standard you want.  To get all the mandatory
186
diagnostics, you must also use \fB\-pedantic\fR.
187
.PP
188
This manual describes the behavior of the \s-1ISO\s0 preprocessor.  To
189
minimize gratuitous differences, where the \s-1ISO\s0 preprocessor's
190
behavior does not conflict with traditional semantics, the
191
traditional preprocessor should behave the same way.  The various
192
differences that do exist are detailed in the section \fBTraditional
193
Mode\fR.
194
.PP
195
For clarity, unless noted otherwise, references to \fB\s-1CPP\s0\fR in this
196
manual refer to \s-1GNU\s0 \s-1CPP\s0.
197
.SH "OPTIONS"
198
.IX Header "OPTIONS"
199
The C preprocessor expects two file names as arguments, \fIinfile\fR and
200
\&\fIoutfile\fR.  The preprocessor reads \fIinfile\fR together with any
201
other files it specifies with \fB#include\fR.  All the output generated
202
by the combined input files is written in \fIoutfile\fR.
203
.PP
204
Either \fIinfile\fR or \fIoutfile\fR may be \fB\-\fR, which as
205
\&\fIinfile\fR means to read from standard input and as \fIoutfile\fR
206
means to write to standard output.  Also, if either file is omitted, it
207
means the same as if \fB\-\fR had been specified for that file.
208
.PP
209
Unless otherwise noted, or the option ends in \fB=\fR, all options
210
which take an argument may have that argument appear either immediately
211
after the option, or with a space between option and argument:
212
\&\fB\-Ifoo\fR and \fB\-I foo\fR have the same effect.
213
.PP
214
Many options have multi-letter names; therefore multiple single-letter
215
options may \fInot\fR be grouped: \fB\-dM\fR is very different from
216
\&\fB\-d\ \-M\fR.
217
.IP "\fB\-D\fR \fIname\fR" 4
218
.IX Item "-D name"
219
Predefine \fIname\fR as a macro, with definition \f(CW1\fR.
220
.IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4
221
.IX Item "-D name=definition"
222
The contents of \fIdefinition\fR are tokenized and processed as if
223
they appeared during translation phase three in a \fB#define\fR
224
directive.  In particular, the definition will be truncated by
225
embedded newline characters.
226
.Sp
227
If you are invoking the preprocessor from a shell or shell-like
228
program you may need to use the shell's quoting syntax to protect
229
characters such as spaces that have a meaning in the shell syntax.
230
.Sp
231
If you wish to define a function-like macro on the command line, write
232
its argument list with surrounding parentheses before the equals sign
233
(if any).  Parentheses are meaningful to most shells, so you will need
234
to quote the option.  With \fBsh\fR and \fBcsh\fR,
235
\&\fB\-D'\fR\fIname\fR\fB(\fR\fIargs...\fR\fB)=\fR\fIdefinition\fR\fB'\fR works.
236
.Sp
237
\&\fB\-D\fR and \fB\-U\fR options are processed in the order they
238
are given on the command line.  All \fB\-imacros\fR \fIfile\fR and
239
\&\fB\-include\fR \fIfile\fR options are processed after all
240
\&\fB\-D\fR and \fB\-U\fR options.
241
.IP "\fB\-U\fR \fIname\fR" 4
242
.IX Item "-U name"
243
Cancel any previous definition of \fIname\fR, either built in or
244
provided with a \fB\-D\fR option.
245
.IP "\fB\-undef\fR" 4
246
.IX Item "-undef"
247
Do not predefine any system-specific or GCC-specific macros.  The
248
standard predefined macros remain defined.
249
.IP "\fB\-I\fR \fIdir\fR" 4
250
.IX Item "-I dir"
251
Add the directory \fIdir\fR to the list of directories to be searched
252
for header files.
253
.Sp
254
Directories named by \fB\-I\fR are searched before the standard
255
system include directories.  If the directory \fIdir\fR is a standard
256
system include directory, the option is ignored to ensure that the
257
default search order for system directories and the special treatment
258
of system headers are not defeated
259
\&.
260
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
261
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
262
.IP "\fB\-o\fR \fIfile\fR" 4
263
.IX Item "-o file"
264
Write output to \fIfile\fR.  This is the same as specifying \fIfile\fR
265
as the second non-option argument to \fBcpp\fR.  \fBgcc\fR has a
266
different interpretation of a second non-option argument, so you must
267
use \fB\-o\fR to specify the output file.
268
.IP "\fB\-Wall\fR" 4
269
.IX Item "-Wall"
270
Turns on all optional warnings which are desirable for normal code.
271
At present this is \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR,
272
\&\fB\-Wmultichar\fR and a warning about integer promotion causing a
273
change of sign in \f(CW\*(C`#if\*(C'\fR expressions.  Note that many of the
274
preprocessor's warnings are on by default and have no options to
275
control them.
276
.IP "\fB\-Wcomment\fR" 4
277
.IX Item "-Wcomment"
278
.PD 0
279
.IP "\fB\-Wcomments\fR" 4
280
.IX Item "-Wcomments"
281
.PD
282
Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
283
comment, or whenever a backslash-newline appears in a \fB//\fR comment.
284
(Both forms have the same effect.)
285
.IP "\fB\-Wtrigraphs\fR" 4
286
.IX Item "-Wtrigraphs"
287
Most trigraphs in comments cannot affect the meaning of the program.
288
However, a trigraph that would form an escaped newline (\fB??/\fR at
289
the end of a line) can, by changing where the comment begins or ends.
290
Therefore, only trigraphs that would form escaped newlines produce
291
warnings inside a comment.
292
.Sp
293
This option is implied by \fB\-Wall\fR.  If \fB\-Wall\fR is not
294
given, this option is still enabled unless trigraphs are enabled.  To
295
get trigraph conversion without warnings, but get the other
296
\&\fB\-Wall\fR warnings, use \fB\-trigraphs \-Wall \-Wno\-trigraphs\fR.
297
.IP "\fB\-Wtraditional\fR" 4
298
.IX Item "-Wtraditional"
299
Warn about certain constructs that behave differently in traditional and
300
\&\s-1ISO\s0 C.  Also warn about \s-1ISO\s0 C constructs that have no traditional C
301
equivalent, and problematic constructs which should be avoided.
302
.IP "\fB\-Wundef\fR" 4
303
.IX Item "-Wundef"
304
Warn whenever an identifier which is not a macro is encountered in an
305
\&\fB#if\fR directive, outside of \fBdefined\fR.  Such identifiers are
306
replaced with zero.
307
.IP "\fB\-Wunused\-macros\fR" 4
308
.IX Item "-Wunused-macros"
309
Warn about macros defined in the main file that are unused.  A macro
310
is \fIused\fR if it is expanded or tested for existence at least once.
311
The preprocessor will also warn if the macro has not been used at the
312
time it is redefined or undefined.
313
.Sp
314
Built-in macros, macros defined on the command line, and macros
315
defined in include files are not warned about.
316
.Sp
317
\&\fINote:\fR If a macro is actually used, but only used in skipped
318
conditional blocks, then \s-1CPP\s0 will report it as unused.  To avoid the
319
warning in such a case, you might improve the scope of the macro's
320
definition by, for example, moving it into the first skipped block.
321
Alternatively, you could provide a dummy use with something like:
322
.Sp
323
.Vb 2
324
\&        #if defined the_macro_causing_the_warning
325
\&        #endif
326
.Ve
327
.IP "\fB\-Wendif\-labels\fR" 4
328
.IX Item "-Wendif-labels"
329
Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text.
330
This usually happens in code of the form
331
.Sp
332
.Vb 5
333
\&        #if FOO
334
\&        ...
335
\&        #else FOO
336
\&        ...
337
\&        #endif FOO
338
.Ve
339
.Sp
340
The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not
341
in older programs.  This warning is on by default.
342
.IP "\fB\-Werror\fR" 4
343
.IX Item "-Werror"
344
Make all warnings into hard errors.  Source code which triggers warnings
345
will be rejected.
346
.IP "\fB\-Wsystem\-headers\fR" 4
347
.IX Item "-Wsystem-headers"
348
Issue warnings for code in system headers.  These are normally unhelpful
349
in finding bugs in your own code, therefore suppressed.  If you are
350
responsible for the system library, you may want to see them.
351
.IP "\fB\-w\fR" 4
352
.IX Item "-w"
353
Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default.
354
.IP "\fB\-pedantic\fR" 4
355
.IX Item "-pedantic"
356
Issue all the mandatory diagnostics listed in the C standard.  Some of
357
them are left out by default, since they trigger frequently on harmless
358
code.
359
.IP "\fB\-pedantic\-errors\fR" 4
360
.IX Item "-pedantic-errors"
361
Issue all the mandatory diagnostics, and make all mandatory diagnostics
362
into errors.  This includes mandatory diagnostics that \s-1GCC\s0 issues
363
without \fB\-pedantic\fR but treats as warnings.
364
.IP "\fB\-M\fR" 4
365
.IX Item "-M"
366
Instead of outputting the result of preprocessing, output a rule
367
suitable for \fBmake\fR describing the dependencies of the main
368
source file.  The preprocessor outputs one \fBmake\fR rule containing
369
the object file name for that source file, a colon, and the names of all
370
the included files, including those coming from \fB\-include\fR or
371
\&\fB\-imacros\fR command line options.
372
.Sp
373
Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the
374
object file name consists of the name of the source file with any
375
suffix replaced with object file suffix and with any leading directory
376
parts removed.  If there are many included files then the rule is
377
split into several lines using \fB\e\fR\-newline.  The rule has no
378
commands.
379
.Sp
380
This option does not suppress the preprocessor's debug output, such as
381
\&\fB\-dM\fR.  To avoid mixing such debug output with the dependency
382
rules you should explicitly specify the dependency output file with
383
\&\fB\-MF\fR, or use an environment variable like
384
\&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR.  Debug output
385
will still be sent to the regular output stream as normal.
386
.Sp
387
Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses
388
warnings with an implicit \fB\-w\fR.
389
.IP "\fB\-MM\fR" 4
390
.IX Item "-MM"
391
Like \fB\-M\fR but do not mention header files that are found in
392
system header directories, nor header files that are included,
393
directly or indirectly, from such a header.
394
.Sp
395
This implies that the choice of angle brackets or double quotes in an
396
\&\fB#include\fR directive does not in itself determine whether that
397
header will appear in \fB\-MM\fR dependency output.  This is a
398
slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier.
399
.IP "\fB\-MF\fR \fIfile\fR" 4
400
.IX Item "-MF file"
401
When used with \fB\-M\fR or \fB\-MM\fR, specifies a
402
file to write the dependencies to.  If no \fB\-MF\fR switch is given
403
the preprocessor sends the rules to the same place it would have sent
404
preprocessed output.
405
.Sp
406
When used with the driver options \fB\-MD\fR or \fB\-MMD\fR,
407
\&\fB\-MF\fR overrides the default dependency output file.
408
.IP "\fB\-MG\fR" 4
409
.IX Item "-MG"
410
In conjunction with an option such as \fB\-M\fR requesting
411
dependency generation, \fB\-MG\fR assumes missing header files are
412
generated files and adds them to the dependency list without raising
413
an error.  The dependency filename is taken directly from the
414
\&\f(CW\*(C`#include\*(C'\fR directive without prepending any path.  \fB\-MG\fR
415
also suppresses preprocessed output, as a missing header file renders
416
this useless.
417
.Sp
418
This feature is used in automatic updating of makefiles.
419
.IP "\fB\-MP\fR" 4
420
.IX Item "-MP"
421
This option instructs \s-1CPP\s0 to add a phony target for each dependency
422
other than the main file, causing each to depend on nothing.  These
423
dummy rules work around errors \fBmake\fR gives if you remove header
424
files without updating the \fIMakefile\fR to match.
425
.Sp
426
This is typical output:
427
.Sp
428
.Vb 1
429
\&        test.o: test.c test.h
430
\&
431
\&        test.h:
432
.Ve
433
.IP "\fB\-MT\fR \fItarget\fR" 4
434
.IX Item "-MT target"
435
Change the target of the rule emitted by dependency generation.  By
436
default \s-1CPP\s0 takes the name of the main input file, deletes any
437
directory components and any file suffix such as \fB.c\fR, and
438
appends the platform's usual object suffix.  The result is the target.
439
.Sp
440
An \fB\-MT\fR option will set the target to be exactly the string you
441
specify.  If you want multiple targets, you can specify them as a single
442
argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options.
443
.Sp
444
For example, \fB\-MT\ '$(objpfx)foo.o'\fR might give
445
.Sp
446
.Vb 1
447
\&        $(objpfx)foo.o: foo.c
448
.Ve
449
.IP "\fB\-MQ\fR \fItarget\fR" 4
450
.IX Item "-MQ target"
451
Same as \fB\-MT\fR, but it quotes any characters which are special to
452
Make.  \fB\-MQ\ '$(objpfx)foo.o'\fR gives
453
.Sp
454
.Vb 1
455
\&        $$(objpfx)foo.o: foo.c
456
.Ve
457
.Sp
458
The default target is automatically quoted, as if it were given with
459
\&\fB\-MQ\fR.
460
.IP "\fB\-MD\fR" 4
461
.IX Item "-MD"
462
\&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that
463
\&\fB\-E\fR is not implied.  The driver determines \fIfile\fR based on
464
whether an \fB\-o\fR option is given.  If it is, the driver uses its
465
argument but with a suffix of \fI.d\fR, otherwise it takes the name
466
of the input file, removes any directory components and suffix, and
467
applies a \fI.d\fR suffix.
468
.Sp
469
If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any
470
\&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR
471
is understood to specify a target object file.
472
.Sp
473
Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate
474
a dependency output file as a side-effect of the compilation process.
475
.IP "\fB\-MMD\fR" 4
476
.IX Item "-MMD"
477
Like \fB\-MD\fR except mention only user header files, not system
478
header files.
479
.IP "\fB\-x c\fR" 4
480
.IX Item "-x c"
481
.PD 0
482
.IP "\fB\-x c++\fR" 4
483
.IX Item "-x c++"
484
.IP "\fB\-x objective-c\fR" 4
485
.IX Item "-x objective-c"
486
.IP "\fB\-x assembler-with-cpp\fR" 4
487
.IX Item "-x assembler-with-cpp"
488
.PD
489
Specify the source language: C, \*(C+, Objective-C, or assembly.  This has
490
nothing to do with standards conformance or extensions; it merely
491
selects which base syntax to expect.  If you give none of these options,
492
cpp will deduce the language from the extension of the source file:
493
\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR.  Some other common
494
extensions for \*(C+ and assembly are also recognized.  If cpp does not
495
recognize the extension, it will treat the file as C; this is the most
496
generic mode.
497
.Sp
498
\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
499
which selected both the language and the standards conformance level.
500
This option has been removed, because it conflicts with the \fB\-l\fR
501
option.
502
.IP "\fB\-std=\fR\fIstandard\fR" 4
503
.IX Item "-std=standard"
504
.PD 0
505
.IP "\fB\-ansi\fR" 4
506
.IX Item "-ansi"
507
.PD
508
Specify the standard to which the code should conform.  Currently \s-1CPP\s0
509
knows about C and \*(C+ standards; others may be added in the future.
510
.Sp
511
\&\fIstandard\fR
512
may be one of:
513
.RS 4
514
.ie n .IP """c90""" 4
515
.el .IP "\f(CWc90\fR" 4
516
.IX Item "c90"
517
.PD 0
518
.ie n .IP """c89""" 4
519
.el .IP "\f(CWc89\fR" 4
520
.IX Item "c89"
521
.ie n .IP """iso9899:1990""" 4
522
.el .IP "\f(CWiso9899:1990\fR" 4
523
.IX Item "iso9899:1990"
524
.PD
525
The \s-1ISO\s0 C standard from 1990.  \fBc90\fR is the customary shorthand for
526
this version of the standard.
527
.Sp
528
The \fB\-ansi\fR option is equivalent to \fB\-std=c90\fR.
529
.ie n .IP """iso9899:199409""" 4
530
.el .IP "\f(CWiso9899:199409\fR" 4
531
.IX Item "iso9899:199409"
532
The 1990 C standard, as amended in 1994.
533
.ie n .IP """iso9899:1999""" 4
534
.el .IP "\f(CWiso9899:1999\fR" 4
535
.IX Item "iso9899:1999"
536
.PD 0
537
.ie n .IP """c99""" 4
538
.el .IP "\f(CWc99\fR" 4
539
.IX Item "c99"
540
.ie n .IP """iso9899:199x""" 4
541
.el .IP "\f(CWiso9899:199x\fR" 4
542
.IX Item "iso9899:199x"
543
.ie n .IP """c9x""" 4
544
.el .IP "\f(CWc9x\fR" 4
545
.IX Item "c9x"
546
.PD
547
The revised \s-1ISO\s0 C standard, published in December 1999.  Before
548
publication, this was known as C9X.
549
.ie n .IP """iso9899:2011""" 4
550
.el .IP "\f(CWiso9899:2011\fR" 4
551
.IX Item "iso9899:2011"
552
.PD 0
553
.ie n .IP """c11""" 4
554
.el .IP "\f(CWc11\fR" 4
555
.IX Item "c11"
556
.ie n .IP """c1x""" 4
557
.el .IP "\f(CWc1x\fR" 4
558
.IX Item "c1x"
559
.PD
560
The revised \s-1ISO\s0 C standard, published in December 2011.  Before
561
publication, this was known as C1X.
562
.ie n .IP """gnu90""" 4
563
.el .IP "\f(CWgnu90\fR" 4
564
.IX Item "gnu90"
565
.PD 0
566
.ie n .IP """gnu89""" 4
567
.el .IP "\f(CWgnu89\fR" 4
568
.IX Item "gnu89"
569
.PD
570
The 1990 C standard plus \s-1GNU\s0 extensions.  This is the default.
571
.ie n .IP """gnu99""" 4
572
.el .IP "\f(CWgnu99\fR" 4
573
.IX Item "gnu99"
574
.PD 0
575
.ie n .IP """gnu9x""" 4
576
.el .IP "\f(CWgnu9x\fR" 4
577
.IX Item "gnu9x"
578
.PD
579
The 1999 C standard plus \s-1GNU\s0 extensions.
580
.ie n .IP """gnu11""" 4
581
.el .IP "\f(CWgnu11\fR" 4
582
.IX Item "gnu11"
583
.PD 0
584
.ie n .IP """gnu1x""" 4
585
.el .IP "\f(CWgnu1x\fR" 4
586
.IX Item "gnu1x"
587
.PD
588
The 2011 C standard plus \s-1GNU\s0 extensions.
589
.ie n .IP """c++98""" 4
590
.el .IP "\f(CWc++98\fR" 4
591
.IX Item "c++98"
592
The 1998 \s-1ISO\s0 \*(C+ standard plus amendments.
593
.ie n .IP """gnu++98""" 4
594
.el .IP "\f(CWgnu++98\fR" 4
595
.IX Item "gnu++98"
596
The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions.  This is the
597
default for \*(C+ code.
598
.RE
599
.RS 4
600
.RE
601
.IP "\fB\-I\-\fR" 4
602
.IX Item "-I-"
603
Split the include path.  Any directories specified with \fB\-I\fR
604
options before \fB\-I\-\fR are searched only for headers requested with
605
\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
606
\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR.  If additional directories are
607
specified with \fB\-I\fR options after the \fB\-I\-\fR, those
608
directories are searched for all \fB#include\fR directives.
609
.Sp
610
In addition, \fB\-I\-\fR inhibits the use of the directory of the current
611
file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR.
612
.Sp
613
This option has been deprecated.
614
.IP "\fB\-nostdinc\fR" 4
615
.IX Item "-nostdinc"
616
Do not search the standard system directories for header files.
617
Only the directories you have specified with \fB\-I\fR options
618
(and the directory of the current file, if appropriate) are searched.
619
.IP "\fB\-nostdinc++\fR" 4
620
.IX Item "-nostdinc++"
621
Do not search for header files in the \*(C+\-specific standard directories,
622
but do still search the other standard directories.  (This option is
623
used when building the \*(C+ library.)
624
.IP "\fB\-include\fR \fIfile\fR" 4
625
.IX Item "-include file"
626
Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first
627
line of the primary source file.  However, the first directory searched
628
for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR
629
the directory containing the main source file.  If not found there, it
630
is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search
631
chain as normal.
632
.Sp
633
If multiple \fB\-include\fR options are given, the files are included
634
in the order they appear on the command line.
635
.IP "\fB\-imacros\fR \fIfile\fR" 4
636
.IX Item "-imacros file"
637
Exactly like \fB\-include\fR, except that any output produced by
638
scanning \fIfile\fR is thrown away.  Macros it defines remain defined.
639
This allows you to acquire all the macros from a header without also
640
processing its declarations.
641
.Sp
642
All files specified by \fB\-imacros\fR are processed before all files
643
specified by \fB\-include\fR.
644
.IP "\fB\-idirafter\fR \fIdir\fR" 4
645
.IX Item "-idirafter dir"
646
Search \fIdir\fR for header files, but do it \fIafter\fR all
647
directories specified with \fB\-I\fR and the standard system directories
648
have been exhausted.  \fIdir\fR is treated as a system include directory.
649
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
650
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
651
.IP "\fB\-iprefix\fR \fIprefix\fR" 4
652
.IX Item "-iprefix prefix"
653
Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
654
options.  If the prefix represents a directory, you should include the
655
final \fB/\fR.
656
.IP "\fB\-iwithprefix\fR \fIdir\fR" 4
657
.IX Item "-iwithprefix dir"
658
.PD 0
659
.IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4
660
.IX Item "-iwithprefixbefore dir"
661
.PD
662
Append \fIdir\fR to the prefix specified previously with
663
\&\fB\-iprefix\fR, and add the resulting directory to the include search
664
path.  \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR
665
would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would.
666
.IP "\fB\-isysroot\fR \fIdir\fR" 4
667
.IX Item "-isysroot dir"
668
This option is like the \fB\-\-sysroot\fR option, but applies only to
669
header files (except for Darwin targets, where it applies to both header
670
files and libraries).  See the \fB\-\-sysroot\fR option for more
671
information.
672
.IP "\fB\-imultilib\fR \fIdir\fR" 4
673
.IX Item "-imultilib dir"
674
Use \fIdir\fR as a subdirectory of the directory containing
675
target-specific \*(C+ headers.
676
.IP "\fB\-isystem\fR \fIdir\fR" 4
677
.IX Item "-isystem dir"
678
Search \fIdir\fR for header files, after all directories specified by
679
\&\fB\-I\fR but before the standard system directories.  Mark it
680
as a system directory, so that it gets the same special treatment as
681
is applied to the standard system directories.
682
.Sp
683
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
684
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
685
.IP "\fB\-iquote\fR \fIdir\fR" 4
686
.IX Item "-iquote dir"
687
Search \fIdir\fR only for header files requested with
688
\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
689
\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR, before all directories specified by
690
\&\fB\-I\fR and before the standard system directories.
691
.Sp
692
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
693
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
694
.IP "\fB\-fdirectives\-only\fR" 4
695
.IX Item "-fdirectives-only"
696
When preprocessing, handle directives, but do not expand macros.
697
.Sp
698
The option's behavior depends on the \fB\-E\fR and \fB\-fpreprocessed\fR
699
options.
700
.Sp
701
With \fB\-E\fR, preprocessing is limited to the handling of directives
702
such as \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#ifdef\*(C'\fR, and \f(CW\*(C`#error\*(C'\fR.  Other
703
preprocessor operations, such as macro expansion and trigraph
704
conversion are not performed.  In addition, the \fB\-dD\fR option is
705
implicitly enabled.
706
.Sp
707
With \fB\-fpreprocessed\fR, predefinition of command line and most
708
builtin macros is disabled.  Macros such as \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, which are
709
contextually dependent, are handled normally.  This enables compilation of
710
files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
711
.Sp
712
With both \fB\-E\fR and \fB\-fpreprocessed\fR, the rules for
713
\&\fB\-fpreprocessed\fR take precedence.  This enables full preprocessing of
714
files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
715
.IP "\fB\-fdollars\-in\-identifiers\fR" 4
716
.IX Item "-fdollars-in-identifiers"
717
Accept \fB$\fR in identifiers.
718
.IP "\fB\-fextended\-identifiers\fR" 4
719
.IX Item "-fextended-identifiers"
720
Accept universal character names in identifiers.  This option is
721
experimental; in a future version of \s-1GCC\s0, it will be enabled by
722
default for C99 and \*(C+.
723
.IP "\fB\-fno\-canonical\-system\-headers\fR" 4
724
.IX Item "-fno-canonical-system-headers"
725
When preprocessing, do not shorten system header paths with canonicalization.
726
.IP "\fB\-fpreprocessed\fR" 4
727
.IX Item "-fpreprocessed"
728
Indicate to the preprocessor that the input file has already been
729
preprocessed.  This suppresses things like macro expansion, trigraph
730
conversion, escaped newline splicing, and processing of most directives.
731
The preprocessor still recognizes and removes comments, so that you can
732
pass a file preprocessed with \fB\-C\fR to the compiler without
733
problems.  In this mode the integrated preprocessor is little more than
734
a tokenizer for the front ends.
735
.Sp
736
\&\fB\-fpreprocessed\fR is implicit if the input file has one of the
737
extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR.  These are the
738
extensions that \s-1GCC\s0 uses for preprocessed files created by
739
\&\fB\-save\-temps\fR.
740
.IP "\fB\-ftabstop=\fR\fIwidth\fR" 4
741
.IX Item "-ftabstop=width"
742
Set the distance between tab stops.  This helps the preprocessor report
743
correct column numbers in warnings or errors, even if tabs appear on the
744
line.  If the value is less than 1 or greater than 100, the option is
745
ignored.  The default is 8.
746
.IP "\fB\-fdebug\-cpp\fR" 4
747
.IX Item "-fdebug-cpp"
748
This option is only useful for debugging \s-1GCC\s0.  When used with
749
\&\fB\-E\fR, dumps debugging information about location maps.  Every
750
token in the output is preceded by the dump of the map its location
751
belongs to.  The dump of the map holding the location of a token would
752
be:
753
.Sp
754
.Vb 1
755
\&        {"P":F;"F":F;"L":;"C":;"S":;"M":;"E":,"loc":}
756
.Ve
757
.Sp
758
When used without \fB\-E\fR, this option has no effect.
759
.IP "\fB\-ftrack\-macro\-expansion\fR[\fB=\fR\fIlevel\fR]" 4
760
.IX Item "-ftrack-macro-expansion[=level]"
761
Track locations of tokens across macro expansions. This allows the
762
compiler to emit diagnostic about the current macro expansion stack
763
when a compilation error occurs in a macro expansion. Using this
764
option makes the preprocessor and the compiler consume more
765
memory. The \fIlevel\fR parameter can be used to choose the level of
766
precision of token location tracking thus decreasing the memory
767
consumption if necessary. Value \fB0\fR of \fIlevel\fR de-activates
768
this option just as if no \fB\-ftrack\-macro\-expansion\fR was present
769
on the command line. Value \fB1\fR tracks tokens locations in a
770
degraded mode for the sake of minimal memory overhead. In this mode
771
all tokens resulting from the expansion of an argument of a
772
function-like macro have the same location. Value \fB2\fR tracks
773
tokens locations completely. This value is the most memory hungry.
774
When this option is given no argument, the default parameter value is
775
\&\fB2\fR.
776
.Sp
777
Note that \-ftrack\-macro\-expansion=2 is activated by default.
778
.IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4
779
.IX Item "-fexec-charset=charset"
780
Set the execution character set, used for string and character
781
constants.  The default is \s-1UTF\-8\s0.  \fIcharset\fR can be any encoding
782
supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
783
.IP "\fB\-fwide\-exec\-charset=\fR\fIcharset\fR" 4
784
.IX Item "-fwide-exec-charset=charset"
785
Set the wide execution character set, used for wide string and
786
character constants.  The default is \s-1UTF\-32\s0 or \s-1UTF\-16\s0, whichever
787
corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR.  As with
788
\&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported
789
by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have
790
problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR.
791
.IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4
792
.IX Item "-finput-charset=charset"
793
Set the input character set, used for translation from the character
794
set of the input file to the source character set used by \s-1GCC\s0.  If the
795
locale does not specify, or \s-1GCC\s0 cannot get this information from the
796
locale, the default is \s-1UTF\-8\s0.  This can be overridden by either the locale
797
or this command line option.  Currently the command line option takes
798
precedence if there's a conflict.  \fIcharset\fR can be any encoding
799
supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
800
.IP "\fB\-fworking\-directory\fR" 4
801
.IX Item "-fworking-directory"
802
Enable generation of linemarkers in the preprocessor output that will
803
let the compiler know the current working directory at the time of
804
preprocessing.  When this option is enabled, the preprocessor will
805
emit, after the initial linemarker, a second linemarker with the
806
current working directory followed by two slashes.  \s-1GCC\s0 will use this
807
directory, when it's present in the preprocessed input, as the
808
directory emitted as the current working directory in some debugging
809
information formats.  This option is implicitly enabled if debugging
810
information is enabled, but this can be inhibited with the negated
811
form \fB\-fno\-working\-directory\fR.  If the \fB\-P\fR flag is
812
present in the command line, this option has no effect, since no
813
\&\f(CW\*(C`#line\*(C'\fR directives are emitted whatsoever.
814
.IP "\fB\-fno\-show\-column\fR" 4
815
.IX Item "-fno-show-column"
816
Do not print column numbers in diagnostics.  This may be necessary if
817
diagnostics are being scanned by a program that does not understand the
818
column numbers, such as \fBdejagnu\fR.
819
.IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4
820
.IX Item "-A predicate=answer"
821
Make an assertion with the predicate \fIpredicate\fR and answer
822
\&\fIanswer\fR.  This form is preferred to the older form \fB\-A\fR
823
\&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because
824
it does not use shell special characters.
825
.IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
826
.IX Item "-A -predicate=answer"
827
Cancel an assertion with the predicate \fIpredicate\fR and answer
828
\&\fIanswer\fR.
829
.IP "\fB\-dCHARS\fR" 4
830
.IX Item "-dCHARS"
831
\&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters,
832
and must not be preceded by a space.  Other characters are interpreted
833
by the compiler proper, or reserved for future versions of \s-1GCC\s0, and so
834
are silently ignored.  If you specify characters whose behavior
835
conflicts, the result is undefined.
836
.RS 4
837
.IP "\fBM\fR" 4
838
.IX Item "M"
839
Instead of the normal output, generate a list of \fB#define\fR
840
directives for all the macros defined during the execution of the
841
preprocessor, including predefined macros.  This gives you a way of
842
finding out what is predefined in your version of the preprocessor.
843
Assuming you have no file \fIfoo.h\fR, the command
844
.Sp
845
.Vb 1
846
\&        touch foo.h; cpp \-dM foo.h
847
.Ve
848
.Sp
849
will show all the predefined macros.
850
.Sp
851
If you use \fB\-dM\fR without the \fB\-E\fR option, \fB\-dM\fR is
852
interpreted as a synonym for \fB\-fdump\-rtl\-mach\fR.
853
.IP "\fBD\fR" 4
854
.IX Item "D"
855
Like \fBM\fR except in two respects: it does \fInot\fR include the
856
predefined macros, and it outputs \fIboth\fR the \fB#define\fR
857
directives and the result of preprocessing.  Both kinds of output go to
858
the standard output file.
859
.IP "\fBN\fR" 4
860
.IX Item "N"
861
Like \fBD\fR, but emit only the macro names, not their expansions.
862
.IP "\fBI\fR" 4
863
.IX Item "I"
864
Output \fB#include\fR directives in addition to the result of
865
preprocessing.
866
.IP "\fBU\fR" 4
867
.IX Item "U"
868
Like \fBD\fR except that only macros that are expanded, or whose
869
definedness is tested in preprocessor directives, are output; the
870
output is delayed until the use or test of the macro; and
871
\&\fB#undef\fR directives are also output for macros tested but
872
undefined at the time.
873
.RE
874
.RS 4
875
.RE
876
.IP "\fB\-P\fR" 4
877
.IX Item "-P"
878
Inhibit generation of linemarkers in the output from the preprocessor.
879
This might be useful when running the preprocessor on something that is
880
not C code, and will be sent to a program which might be confused by the
881
linemarkers.
882
.IP "\fB\-C\fR" 4
883
.IX Item "-C"
884
Do not discard comments.  All comments are passed through to the output
885
file, except for comments in processed directives, which are deleted
886
along with the directive.
887
.Sp
888
You should be prepared for side effects when using \fB\-C\fR; it
889
causes the preprocessor to treat comments as tokens in their own right.
890
For example, comments appearing at the start of what would be a
891
directive line have the effect of turning that line into an ordinary
892
source line, since the first token on the line is no longer a \fB#\fR.
893
.IP "\fB\-CC\fR" 4
894
.IX Item "-CC"
895
Do not discard comments, including during macro expansion.  This is
896
like \fB\-C\fR, except that comments contained within macros are
897
also passed through to the output file where the macro is expanded.
898
.Sp
899
In addition to the side-effects of the \fB\-C\fR option, the
900
\&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro
901
to be converted to C\-style comments.  This is to prevent later use
902
of that macro from inadvertently commenting out the remainder of
903
the source line.
904
.Sp
905
The \fB\-CC\fR option is generally used to support lint comments.
906
.IP "\fB\-traditional\-cpp\fR" 4
907
.IX Item "-traditional-cpp"
908
Try to imitate the behavior of old-fashioned C preprocessors, as
909
opposed to \s-1ISO\s0 C preprocessors.
910
.IP "\fB\-trigraphs\fR" 4
911
.IX Item "-trigraphs"
912
Process trigraph sequences.
913
.IP "\fB\-remap\fR" 4
914
.IX Item "-remap"
915
Enable special code to work around file systems which only permit very
916
short file names, such as MS-DOS.
917
.IP "\fB\-\-help\fR" 4
918
.IX Item "--help"
919
.PD 0
920
.IP "\fB\-\-target\-help\fR" 4
921
.IX Item "--target-help"
922
.PD
923
Print text describing all the command line options instead of
924
preprocessing anything.
925
.IP "\fB\-v\fR" 4
926
.IX Item "-v"
927
Verbose mode.  Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of
928
execution, and report the final form of the include path.
929
.IP "\fB\-H\fR" 4
930
.IX Item "-H"
931
Print the name of each header file used, in addition to other normal
932
activities.  Each name is indented to show how deep in the
933
\&\fB#include\fR stack it is.  Precompiled header files are also
934
printed, even if they are found to be invalid; an invalid precompiled
935
header file is printed with \fB...x\fR and a valid one with \fB...!\fR .
936
.IP "\fB\-version\fR" 4
937
.IX Item "-version"
938
.PD 0
939
.IP "\fB\-\-version\fR" 4
940
.IX Item "--version"
941
.PD
942
Print out \s-1GNU\s0 \s-1CPP\s0's version number.  With one dash, proceed to
943
preprocess as normal.  With two dashes, exit immediately.
944
.SH "ENVIRONMENT"
945
.IX Header "ENVIRONMENT"
946
This section describes the environment variables that affect how \s-1CPP\s0
947
operates.  You can use them to specify directories or prefixes to use
948
when searching for include files, or to control dependency output.
949
.PP
950
Note that you can also specify places to search using options such as
951
\&\fB\-I\fR, and control dependency output with options like
952
\&\fB\-M\fR.  These take precedence over
953
environment variables, which in turn take precedence over the
954
configuration of \s-1GCC\s0.
955
.IP "\fB\s-1CPATH\s0\fR" 4
956
.IX Item "CPATH"
957
.PD 0
958
.IP "\fBC_INCLUDE_PATH\fR" 4
959
.IX Item "C_INCLUDE_PATH"
960
.IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4
961
.IX Item "CPLUS_INCLUDE_PATH"
962
.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4
963
.IX Item "OBJC_INCLUDE_PATH"
964
.PD
965
Each variable's value is a list of directories separated by a special
966
character, much like \fB\s-1PATH\s0\fR, in which to look for header files.
967
The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and
968
determined at \s-1GCC\s0 build time.  For Microsoft Windows-based targets it is a
969
semicolon, and for almost all other targets it is a colon.
970
.Sp
971
\&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if
972
specified with \fB\-I\fR, but after any paths given with \fB\-I\fR
973
options on the command line.  This environment variable is used
974
regardless of which language is being preprocessed.
975
.Sp
976
The remaining environment variables apply only when preprocessing the
977
particular language indicated.  Each specifies a list of directories
978
to be searched as if specified with \fB\-isystem\fR, but after any
979
paths given with \fB\-isystem\fR options on the command line.
980
.Sp
981
In all these variables, an empty element instructs the compiler to
982
search its current working directory.  Empty elements can appear at the
983
beginning or end of a path.  For instance, if the value of
984
\&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same
985
effect as \fB\-I.\ \-I/special/include\fR.
986
.IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4
987
.IX Item "DEPENDENCIES_OUTPUT"
988
If this variable is set, its value specifies how to output
989
dependencies for Make based on the non-system header files processed
990
by the compiler.  System header files are ignored in the dependency
991
output.
992
.Sp
993
The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in
994
which case the Make rules are written to that file, guessing the target
995
name from the source file name.  Or the value can have the form
996
\&\fIfile\fR\fB \fR\fItarget\fR, in which case the rules are written to
997
file \fIfile\fR using \fItarget\fR as the target name.
998
.Sp
999
In other words, this environment variable is equivalent to combining
1000
the options \fB\-MM\fR and \fB\-MF\fR,
1001
with an optional \fB\-MT\fR switch too.
1002
.IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4
1003
.IX Item "SUNPRO_DEPENDENCIES"
1004
This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above),
1005
except that system header files are not ignored, so it implies
1006
\&\fB\-M\fR rather than \fB\-MM\fR.  However, the dependence on the
1007
main input file is omitted.
1008
.SH "SEE ALSO"
1009
.IX Header "SEE ALSO"
1010
\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7),
1011
\&\fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIcpp\fR, \fIgcc\fR, and
1012
\&\fIbinutils\fR.
1013
.SH "COPYRIGHT"
1014
.IX Header "COPYRIGHT"
1015
Copyright (c) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
1016
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
1017
2008, 2009, 2010, 2011
1018
Free Software Foundation, Inc.
1019
.PP
1020
Permission is granted to copy, distribute and/or modify this document
1021
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
1022
any later version published by the Free Software Foundation.  A copy of
1023
the license is included in the
1024
man page \fIgfdl\fR\|(7).
1025
This manual contains no Invariant Sections.  The Front-Cover Texts are
1026
(a) (see below), and the Back-Cover Texts are (b) (see below).
1027
.PP
1028
(a) The \s-1FSF\s0's Front-Cover Text is:
1029
.PP
1030
.Vb 1
1031
\&     A GNU Manual
1032
.Ve
1033
.PP
1034
(b) The \s-1FSF\s0's Back-Cover Text is:
1035
.PP
1036
.Vb 3
1037
\&     You have freedom to copy and modify this GNU Manual, like GNU
1038
\&     software.  Copies published by the Free Software Foundation raise
1039
\&     funds for GNU development.
1040
.Ve

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.