diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2016-12-25 19:31:02 -0500 |
---|---|---|
committer | Sandra Loosemore <sandra@gcc.gnu.org> | 2016-12-25 19:31:02 -0500 |
commit | 71585576bc1de428f4741b4cb6cc7d5eebea4166 (patch) | |
tree | dad9118d56d4daf50fce1d432bc712c8c22ac51b /gcc/doc/cpp.texi | |
parent | 71382babc668e7c16b16c63aee8638a60b5385a5 (diff) | |
download | gcc-71585576bc1de428f4741b4cb6cc7d5eebea4166.zip gcc-71585576bc1de428f4741b4cb6cc7d5eebea4166.tar.gz gcc-71585576bc1de428f4741b4cb6cc7d5eebea4166.tar.bz2 |
cpp.texi (Invocation): Revise to indicate that GCC driver options are only documented in the GCC manual.
2016-12-25 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* doc/cpp.texi (Invocation): Revise to indicate that GCC driver
options are only documented in the GCC manual.
* doc/cppopts.texi: Delete documentation of GCC driver options
-o, -Wall, -Wtraditional, -Werror, -Wsystem-headers, -w,
-pedantic, -pedantic-errors, -std=, -ansi, --help, --target-help,
-v, -version. Update -Wcomment, -Wtrigraphs, -Wundef,
-Wexpansion-to-defined, -Wno-endif-labels, -traditional,
-traditional-cpp, -trigraphs to merge text previously in GCC manual.
* doc/invoke.texi (Option Summary): Move -trigraphs, -traditional,
and -traditional-cpp from C dialect options to preprocessor options.
(C Dialect Options): Likewise.
(Warning Options): Delete documentation of -Wcomment, -Wtrigraphs,
-Wexpansion-to-defined, -Wundef, and -Wno-endif-labels.
From-SVN: r243923
Diffstat (limited to 'gcc/doc/cpp.texi')
-rw-r--r-- | gcc/doc/cpp.texi | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 7348448..8810b1e 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -4285,51 +4285,54 @@ You can also make or cancel assertions using command-line options. @cindex invocation @cindex command line -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. - -@emph{Note:} Whether you use the preprocessor by way of @command{gcc} -or @command{cpp}, the @dfn{compiler driver} 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. +Most often when you use the C preprocessor you do not have to invoke it +explicitly: the C compiler does so automatically. However, the +preprocessor is sometimes useful on its own. You can invoke the +preprocessor either with the @command{cpp} command, or via @command{gcc -E}. +In GCC, the preprocessor is actually integrated with the compiler +rather than a separate program, and both of these commands invoke +GCC and tell it to stop after the preprocessing phase. + +The @command {cpp} options listed here are also accepted by +@command{gcc} and have the same meaning. Likewise the @command{cpp} +command accepts all the usual @command{gcc} driver options, although those +pertaining to compilation phases after preprocessing are ignored. + +Only options specific to preprocessing behavior are documented here. +Refer to the GCC manual for full documentation of other driver options. @ignore @c man begin SYNOPSIS cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] - [@option{-W}@var{warn}@dots{}] [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] [@option{-MP}] [@option{-MQ} @var{target}@dots{}] [@option{-MT} @var{target}@dots{}] - [@option{-P}] [@option{-fno-working-directory}] - [@option{-x} @var{language}] [@option{-std=}@var{standard}] - @var{infile} @var{outfile} + @var{infile} [[@option{-o}] @var{outfile}] -Only the most useful options are listed here; see below for the remainder. +Only the most useful options are given above; see below for a more +complete list of preprocessor-specific options. +In addition, @command{cpp} accepts most @command{gcc} driver options, which +are not listed here. Refer to the GCC documentation for details. @c man end @c man begin SEEALSO gpl(7), gfdl(7), fsf-funding(7), -gcc(1), as(1), ld(1), and the Info entries for @file{cpp}, @file{gcc}, and -@file{binutils}. +gcc(1), and the Info entries for @file{cpp} and @file{gcc}. @c man end @end ignore @c man begin OPTIONS -The C preprocessor expects two file names as arguments, @var{infile} and +The @command{cpp} command expects two file names as arguments, @var{infile} and @var{outfile}. The preprocessor reads @var{infile} together with any other files it specifies with @samp{#include}. All the output generated by the combined input files is written in @var{outfile}. Either @var{infile} or @var{outfile} may be @option{-}, which as @var{infile} means to read from standard input and as @var{outfile} -means to write to standard output. Also, if either file is omitted, it +means to write to standard output. If either file is omitted, it means the same as if @option{-} had been specified for that file. +You can also use the @option{-o @var{outfile}} option to specify the +output file. Unless otherwise noted, or the option ends in @samp{=}, all options which take an argument may have that argument appear either immediately @@ -4343,7 +4346,10 @@ options may @emph{not} be grouped: @option{-dM} is very different from @w{@samp{-d -M}}. @cindex options + +@table @gcctabopt @include cppopts.texi +@end table @c man end @node Environment Variables |