This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More cpp.texi updates


Zack,

Following yesterday's discussion, does this look good to you for
mainline?

Neil.

	* cpp.texi, invoke.texi: Update.
	* cpp.1, gcc.1: Regenerate.

Index: cpp.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/cpp.texi,v
retrieving revision 1.5
diff -u -p -r1.5 cpp.texi
--- cpp.texi	2001/06/15 23:40:33	1.5
+++ cpp.texi	2001/06/16 08:26:04
@@ -986,7 +986,7 @@ These rules are implementation-defined b
 standard.  To minimize the risk of different compilers interpreting your
 computed includes differently, we recommend you use only a single
 object-like macro which expands to a string constant.  This will also
-minimize any confusion to people reading your program.
+minimize confusion for people reading your program.
 
 @node Wrapper Headers
 @section Wrapper Headers
@@ -1634,7 +1634,7 @@ eprintf("success!\n", );
      @expansion{} fprintf(stderr, "success!\n", );
 @end example
 
-GNU CPP has a pair of extensions which deals with this problem. First,
+GNU CPP has a pair of extensions which deal with this problem. First,
 you are allowed to leave the variable argument out entirely:
 
 @example
@@ -1893,7 +1893,7 @@ testing @code{@w{(__GNUC__ && __cplusplu
 @item __STRICT_ANSI__
 GCC defines this macro if and only if the @option{-ansi} switch, or a
 @option{-std} switch specifying strict conformance to some version of ISO C,
-was specified when GCC was invoked.  Its definition is the null string.
+was specified when GCC was invoked.  It is defined to @samp{1}.
 This macro exists primarily to direct GNU libc's header files to
 restrict their definitions to the minimal set found in the 1989 C
 standard.
@@ -3006,13 +3006,13 @@ symbolic debuggers to be able to refer t
 @samp{#line} directives into the output file.  @samp{#line} is a
 directive that specifies the original line number and source file name
 for subsequent input in the current preprocessor input file.
-@samp{#line} has four variants:
+@samp{#line} has three variants:
 
 @table @code
 @item #line @var{linenum}
-@var{linenum} is a decimal integer constant.  It specifies the line
-number which should be reported for the following line of input.
-Subsequent lines are counted from @var{linenum}.
+@var{linenum} is a non-negative decimal integer constant.  It specifies
+the line number which should be reported for the following line of
+input.  Subsequent lines are counted from @var{linenum}.
 
 @item #line @var{linenum} @var{filename}
 @var{linenum} is the same as for the first form, and has the same
@@ -3022,18 +3022,30 @@ file it specifies, until something else 
 
 @item #line @var{anything else}
 @var{anything else} is checked for macro calls, which are expanded.
-The result should match one of the above three forms.
+The result should match one of the above two forms.
+@end table
 
+Additionally, as an extension, GCC accepts a slight variant that omits
+the directive name @samp{line}.
+
+@table @code
+@item # @var{linenum}
+This has the same effect as the corresponding @samp{#line} form above.
+
+@item # @var{linenum} @var{filename}
+This has the same effect as the corresponding @samp{#line} form above.
+
 @item # @var{linenum} @var{filename} @var{flags@dots{}}
-This form is a GCC extension.  @var{linenum} and @var{filename} are the
-same as the second form.  The @var{flags} are small increasing positive
-integers, which have the same meaning as the flags which can appear at
-the end of a linemarker in the preprocessor's output.
-@xref{Preprocessor Output}.  Note that this form does not use the
-directive name @samp{line}.
+The @var{flags} are small increasing positive integers, which have the
+same meaning as the flags which can appear at the end of a linemarker in
+the preprocessor's output.  @xref{Preprocessor Output}.
+
+@item # @var{anything else}
+@var{anything else} is checked for macro calls, which are expanded.
+The result should match one of the above three forms.
 @end table
 
-@samp{#line} directives alter the results of the @code{__FILE__} and
+These directives alter the results of the @code{__FILE__} and
 @code{__LINE__} predefined macros from that point on.  @xref{Standard
 Predefined Macros}.  They do not have any effect on @samp{#include}'s
 idea of the directory containing the current file.
@@ -3815,10 +3827,16 @@ Either @var{infile} or @var{outfile} may
 means to write to standard output.  Also, if either file is omitted, it
 means the same as if @option{-} had been specified for that file.
 
-All single-letter options which take an argument may have that argument
-appear immediately after the option letter, or with a space between
-option and argument:  @option{-Ifoo} and @option{-I foo} have the same
-effect.
+Unless otherwise noted, or the option ends in @samp{=}, all options
+which take an argument may have that argument appear either immediately
+after the option, or with a space between option and argument:
+@option{-Ifoo} and @option{-I foo} have the same effect.
+
+@cindex grouping options
+@cindex options, grouping
+Many options have multi-letter names; therefore multiple single-letter
+options may @emph{not} be grouped: @option{-dM} is very different from
+@w{@samp{-d -M}}.
 
 @cindex options
 @table @gcctabopt
@@ -4170,7 +4188,14 @@ the command line.  Also, undefine all pr
 macros preceding it on the command line.  (This is a historical wart and
 may change in the future.)
 
-@item -dM
+@item -dCHARS
+@var{CHARS} is a sequence of one or more of the following characters,
+and must not be preceded by a space.  Other characters are reserved for
+future versions of GCC, and silently ignored.  If you specify characters
+whose behavior conflicts, the result is undefined.
+
+@table @samp
+@item M
 Instead of the normal output, generate a list of @samp{#define}
 directives for all the macros defined during the execution of the
 preprocessor, including predefined macros.  This gives you a way of
@@ -4184,18 +4209,19 @@ touch foo.h; cpp -dM foo.h
 @noindent
 will show all the predefined macros.
 
-@item -dD
-Like @option{-dM} except in two respects: it does @emph{not} include the
+@item D
+Like @samp{M} except in two respects: it does @emph{not} include the
 predefined macros, and it outputs @emph{both} the @samp{#define}
 directives and the result of preprocessing.  Both kinds of output go to
 the standard output file.
 
-@item -dN
-Like @option{-dD}, but emit only the macro names, not their expansions.
+@item N
+Like @samp{D}, but emit only the macro names, not their expansions.
 
-@item -dI
+@item I
 Output @samp{#include} directives in addition to the result of
 preprocessing.
+@end table
 
 @item -P
 Inhibit generation of linemarkers in the output from the preprocessor.
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.13
diff -u -p -r1.13 invoke.texi
--- invoke.texi	2001/06/14 22:51:17	1.13
+++ invoke.texi	2001/06/16 08:28:12
@@ -4059,12 +4059,14 @@ preprocessing.
 Indicate to the preprocessor that the input file has already been
 preprocessed.  This suppresses things like macro expansion, trigraph
 conversion, escaped newline splicing, and processing of most directives.
-In this mode the integrated preprocessor is little more than a tokenizer
-for the front ends.
+The preprocessor still recognizes and removes comments, so that you can
+pass a file preprocessed with @option{-C} to the compiler without
+problems.  In this mode the integrated preprocessor is little more than
+a tokenizer for the front ends.
 
 @option{-fpreprocessed} is implicit if the input file has one of the
-extensions @samp{i}, @samp{ii} or @samp{mi} indicating it has already
-been preprocessed.
+extensions @samp{i}, @samp{ii} or @samp{mi}.  These are the extensions
+that GCC uses for preprocessed files created by @option{-save-temps}.
 
 @item -trigraphs
 @opindex trigraphs


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]