From: Mikael Morin <mik...@gcc.gnu.org>

With this change, -ffixed-line-length-n and -ffree-line-length-n are the
only remaining options with variables appearing in the index.  But I
think they are better left as-is.

I refrained from adding the missing syntactic variant in the
documentation of options allowing both separate and joined argument
(like -I foo and -Ifoo), as that would have been less consistent.

Checked with make html pdf, and visually checking the affected options,
both in the index and on the options pages.
OK for master?

-- >8 --

Remove variables from the fortran option index to improve consistency
and URL recognition by the regenerate-opt-urls.py script.

For options matching -foo=arg, only keep foo in the index.  About half of
the options were already this way, the other half having the argument
appearing in the index.  Always keeping the =arg suffix in the index was
another possibility, but the user benefit doesn't seem high, it would be
worse regarding URL recognition, and the rest of the compiler documentation
prefers stripping the suffix.

For single-letter joined options (-Sfoo with S in A, D, U, I), only keep the
single letter.  The pros and cons of keeping or dropping the suffix are the
same as in the previous case.  For the user, the benefit of keeping the
variable would be slightly higher maybe, but as there is no other option
starting with the single letter, there is no risk of confusion if the
variable is stripped).
Keeping only the single letter has the side effect of forcing the removal
of the separate indexing for options where there is some, namely
-Afoo=bar vs -A-foo=bar for A, and -Dfoo vs -Dfoo=bar for D.

gcc/fortran/ChangeLog:

        * invoke.texi (-fmax-identifier-length, -std, -fmax-errors,
        -ffpe-trap, -ffpe-summary, -fconvert, -frecord-marker,
        -fmax-subrecord-length): Drop the =variable suffix in the index.
        (-A, -D, -U, -I): Drop the variable suffix in the index.
        (-A): Remove the separate indexing of assertion cancelation.
        (-D): Remove the separate indexing of macros with definitions.
---
 gcc/fortran/invoke.texi | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index a9ac87d3a32..784d6115bfb 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -405,7 +405,7 @@ lines in the source file. The default value is 132.
 @option{-ffree-line-length-0} means the same thing as
 @option{-ffree-line-length-none}.
 
-@opindex fmax-identifier-length=@var{n}
+@opindex fmax-identifier-length
 @item -fmax-identifier-length=@var{n}
 Specify the maximum allowed identifier length. Typical values are
 31 (Fortran 95) and 63 (Fortran 2003 and later).
@@ -588,7 +588,7 @@ when passing a value to the @code{kind=} dummy argument.  
Inspection of the
 intermediate representation of the translated Fortran code, produced by
 @option{-fdump-fortran-original} or @option{-fdump-tree-original}, is 
suggested.
 
-@opindex std=@var{std}
+@opindex std
 @item -std=@var{std}
 Specify the standard to which the program is expected to conform,
 which may be one of @samp{f95}, @samp{f2003}, @samp{f2008}, @samp{f2018},
@@ -803,15 +803,13 @@ directory of the current file, if appropriate) are 
searched.
 Do not predefine any system-specific or GCC-specific macros.
 The standard predefined macros remain defined.
 
-@opindex A@var{predicate}=@var{answer}
+@opindex A
 @cindex preprocessing, assertion
 @item -A@var{predicate}=@var{answer}
 Make an assertion with the predicate @var{predicate} and answer @var{answer}.
 This form is preferred to the older form -A predicate(answer), which is still
 supported, because it does not use shell special characters.
 
-@opindex A-@var{predicate}=@var{answer}
-@cindex preprocessing, assertion
 @item -A-@var{predicate}=@var{answer}
 Cancel an assertion with the predicate @var{predicate} and answer @var{answer}.
 
@@ -847,13 +845,11 @@ is generally used to support lint comments.
 Warning: this currently handles C- and C++-Style comments only. The
 preprocessor does not yet recognize Fortran-style comments.
 
-@opindex D@var{name}
+@opindex D
 @cindex preprocessing, define macros
 @item -D@var{name}
 Predefine name as a macro, with definition @code{1}.
 
-@opindex D@var{name}=@var{definition}
-@cindex preprocessing, define macros
 @item -D@var{name}=@var{definition}
 The contents of @var{definition} are tokenized and processed as if they
 appeared during translation phase three in a @code{'#define'} directive.
@@ -888,7 +884,7 @@ This might be useful when running the preprocessor on 
something that
 is not C code, and will be sent to a program which might be confused
 by the linemarkers.
 
-@opindex U@var{name}
+@opindex U
 @cindex preprocessing, undefine macros
 @item -U@var{name}
 Cancel any previous definition of @var{name}, either built in or provided
@@ -926,7 +922,7 @@ These options control the amount and kinds of errors and 
warnings produced
 by GNU Fortran:
 
 @table @gcctabopt
-@opindex fmax-errors=@var{n}
+@opindex fmax-errors
 @cindex errors, limiting
 @item -fmax-errors=@var{n}
 Limits the maximum number of error messages to @var{n}, at which point
@@ -1307,7 +1303,7 @@ useful for debugging the compiler's code generation 
together with
 @code{-fdump-tree-original} and enabling debugging of the executable
 program by using @code{-g} or @code{-ggdb3}.
 
-@opindex ffpe-trap=@var{list}
+@opindex ffpe-trap
 @item -ffpe-trap=@var{list}
 Specify a list of floating point exception traps to enable.  On most
 systems, if a floating point exception occurs and the trap for that
@@ -1343,7 +1339,7 @@ be uninteresting in practice.
 
 By default no exception traps are enabled.
 
-@opindex ffpe-summary=@var{list}
+@opindex ffpe-summary
 @item -ffpe-summary=@var{list}
 Specify a list of floating-point exceptions, whose flag status is printed
 to @code{ERROR_UNIT} when invoking @code{STOP} and @code{ERROR STOP}.
@@ -1390,7 +1386,7 @@ It also affects the search paths used by @command{cpp} 
when used to preprocess
 Fortran source.
 
 @table @gcctabopt
-@opindex I@var{dir}
+@opindex I
 @cindex directory, search paths for inclusion
 @cindex inclusion, directory search paths for
 @cindex search paths, for included files
@@ -1471,7 +1467,7 @@ requirements when redistributing the resulting binaries.
 These options affect the runtime behavior of programs compiled with GNU 
Fortran.
 
 @table @gcctabopt
-@opindex fconvert=@var{conversion}
+@opindex fconvert
 @item -fconvert=@var{conversion}
 Specify the representation of data for unformatted files.  Valid
 values for conversion on most systems are: @samp{native}, the default;
@@ -1493,7 +1489,7 @@ commas.  Those are
 The @code{CONVERT} specifier and the GFORTRAN_CONVERT_UNIT environment
 variable override the default specified by @option{-fconvert}.}
 
-@opindex frecord-marker=@var{length}
+@opindex frecord-marker
 @item -frecord-marker=@var{length}
 Specify the length of record markers for unformatted files.
 Valid values for @var{length} are 4 and 8.  Default is 4.
@@ -1502,7 +1498,7 @@ which specified a default record marker length of 8 on 
most
 systems.  If you want to read or write files compatible
 with earlier versions of @command{gfortran}, use @option{-frecord-marker=8}.
 
-@opindex fmax-subrecord-length=@var{length}
+@opindex fmax-subrecord-length
 @item -fmax-subrecord-length=@var{length}
 Specify the maximum length for a subrecord.  The maximum permitted
 value for length is 2147483639, which is also the default.  Only
-- 
2.45.2

Reply via email to