[doc,committed] fix preprocessor -d option table formatting

Message ID 58719AB6.9060901@codesourcery.com
State New
Headers show

Commit Message

Sandra Loosemore Jan. 8, 2017, 1:49 a.m.
PR 54124 complains that the documentation for preprocessor options like 
-dM is hard to find because the string "-dM" doesn't appear explicitly 
in the table.  Instead, it's documented as @samp{M} in a subtable under 
the -dCHARS option.  The corresponding documentation of the more general 
compiler dump options, in another section, does list the full name of 
the options in the subtable.  I've fixed the preprocessor -d option 
documentation to be consistent with that format, and added 
cross-references back and forth too.

-Sandra

Patch hide | download patch | download mbox

Index: gcc/doc/cppopts.texi
===================================================================
--- gcc/doc/cppopts.texi	(revision 244200)
+++ gcc/doc/cppopts.texi	(working copy)
@@ -458,15 +458,20 @@  activities.  Each name is indented to sh
 printed, even if they are found to be invalid; an invalid precompiled
 header file is printed with @samp{...x} and a valid one with @samp{...!} .
 
-@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 interpreted
+@item -d@var{letters}
+@opindex d
+Says to make debugging dumps during compilation as specified by
+@var{letters}.  The flags documented here are those relevant to the
+preprocessor.  Other @var{letters} are interpreted
 by the compiler proper, or reserved for future versions of GCC, and so
-are silently ignored.  If you specify characters whose behavior
+are silently ignored.  If you specify @var{letters} whose behavior
 conflicts, the result is undefined.
+@ifclear cppmanual
+@xref{Developer Options}, for more information.
+@end ifclear
 
-@table @samp
-@item M
+@table @gcctabopt
+@item -dM
 @opindex dM
 Instead of the normal output, generate a list of @samp{#define}
 directives for all the macros defined during the execution of the
@@ -487,25 +492,25 @@  interpreted as a synonym for @option{-fd
 @xref{Developer Options, , ,gcc}.
 @end ifclear
 
-@item D
+@item -dD
 @opindex dD
-Like @samp{M} except in two respects: it does @emph{not} include the
+Like @option{-dM} 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 N
+@item -dN
 @opindex dN
-Like @samp{D}, but emit only the macro names, not their expansions.
+Like @option{-dD}, but emit only the macro names, not their expansions.
 
-@item I
+@item -dI
 @opindex dI
 Output @samp{#include} directives in addition to the result of
 preprocessing.
 
-@item U
+@item -dU
 @opindex dU
-Like @samp{D} except that only macros that are expanded, or whose
+Like @option{-dD} except that only macros that are expanded, or whose
 definedness is tested in preprocessor directives, are output; the
 output is delayed until the use or test of the macro; and
 @samp{#undef} directives are also output for macros tested but
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 244200)
+++ gcc/doc/invoke.texi	(working copy)
@@ -12541,8 +12541,11 @@  passes that are otherwise registered aft
 numbered higher than a pass named "final", even if they are executed
 earlier.  @var{dumpname} is generated from the name of the output
 file if explicitly specified and not an executable, otherwise it is
-the basename of the source file.  These switches may have different
-effects when @option{-E} is used for preprocessing.
+the basename of the source file.  
+
+Some @option{-d@var{letters}} switches have different meaning when
+@option{-E} is used for preprocessing.  @xref{Preprocessor Options},
+for information about preprocessor-specific dump options.
 
 Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
 @option{-d} option @var{letters}.  Here are the possible