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