[Main]
Title=C Preprocessor Command-Line Options
Subsections=SEC45

[Top]
Most often, when you use the C preprocessor, you will not have to invoke it
explicitly: the C compiler will do so automatically.  However, the
preprocessor is sometimes useful on its own.  All the options listed
here are also acceptable to the C compiler and have the same meaning,
except that the C compiler has different rules for specifying the output
file.
<BR><BR>
<B>Note:</B> Whether you use the preprocessor by way of <CODE>gcc</CODE>
or <CODE>cpp</CODE>, the <U>compiler driver</U> is run first.  This
program's purpose is to translate your command into invocations of the
programs that do the actual work.  Their command line interfaces are
similar but not identical to the documented interface, and may change
without notice.
<BR><BR>
The C preprocessor expects two file names as arguments, <I>infile</I> and
<I>outfile</I>.  The preprocessor reads <I>infile</I> together with any
other files it specifies with <CODE>#include</CODE>.  All the output generated
by the combined input files is written in <I>outfile</I>.
<BR><BR>
Either <I>infile</I> or <I>outfile</I> may be <B>'-'</B>, which as
<I>infile</I> means to read from standard input and as <I>outfile</I>
means to write to standard output.  Also, if either file is omitted, it
means the same as if <B>'-'</B> had been specified for that file.
<BR><BR>
Unless otherwise noted, or the option ends in <CODE>=</CODE>, all options
which take an argument may have that argument appear either immediately
after the option, or with a space between option and argument:
<B>'-Ifoo'</B> and <B>'-I foo'</B> have the same effect.
<BR><BR>
Many options have multi-letter names; therefore multiple single-letter
options may <I>not</I> be grouped: <B>'-dM'</B> is very different from
<B>'-d -M'</B>.
<BR><BR>
For the actual command-line options, see
<A HREF="$$INFOLINK(comopts/SEC11)">GCC Options Controlling the Preprocessor</A>.
