aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/cppopts.texi
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2023-02-23 11:27:11 +0100
committerGerald Pfeifer <gerald@pfeifer.com>2023-02-23 23:42:01 +0100
commitf33d7a88d069d169bbe76da8e5c52de17f68ca05 (patch)
tree6d399142c972278067733d030a73fb2e807af488 /gcc/doc/cppopts.texi
parentf83e76c3f998c8708fe2ddca16ae3f317c39c37a (diff)
downloadgcc-f33d7a88d069d169bbe76da8e5c52de17f68ca05.zip
gcc-f33d7a88d069d169bbe76da8e5c52de17f68ca05.tar.gz
gcc-f33d7a88d069d169bbe76da8e5c52de17f68ca05.tar.bz2
**/*.texi: Reorder index entries
This change is a generalization of r13-6292-gddf6fe375d9110. Historically, makeinfo exhibited a bug, due to which a structure like: @item foo @cindex foo @cindex bar ... would be transformed into an item heading, with the first index entry on it, followed by an item body, with the second index entry in it. This has often lead to index entries not linking to relevant items, but rather, just below them. This bug was exhibited in both Info and HTML documentation, and was most glaringly obvious in the latter. After a discussion with the Texinfo developers, it was decided that the appropriate construct for this case is: @cindex foo @cindex bar @item foo ... which behaves correctly in newer versions, linking all the index entries to the item itself. This pattern also produces copiable anchors in HTML output. This commit fixes most indices to follow the pattern above, however, omits relevant changes in the Ada manuals, as the algorithm described below lead to many false positives and unwanted changes in that manual. Much like the previous commit, this change is mostly mechanical, with a simple script. I have, however, gone over the patch myself also, to see if there's anything that ought to be kept as-is. Formatter: # GPL3+ use v5.35; use strict; use warnings; my @lineq = (); my @itemq = (); my @indxq = (); my $lstin = 0; while (<>) { push (@lineq, $_); if (/^\@[a-zA-Z0-9]{1,2}index\W/) { $lstin = @lineq; push (@indxq, $_); next; } if (/^\@itemx?\W/) { $lstin = @lineq; push (@itemq, $_); next; } next if $lstin && /^\s*(\@c(omment)?\W.*)?$/; if (@indxq and @itemq) { print @indxq; print @itemq; print @lineq[$lstin..@lineq-1]; } else { print @lineq; } @lineq = (); @itemq = (); @indxq = (); $lstin = 0; } if (@indxq and @itemq) { print @indxq; print @itemq; print @lineq[$lstin..@lineq-1]; } else { print @lineq; } # Local Variables: # indent-tabs-mode: nil # End: gcc/d/ChangeLog: * implement-d.texi: Reorder index entries around @items. gcc/ChangeLog: * doc/cfg.texi: Reorder index entries around @items. * doc/cpp.texi: Ditto. * doc/cppenv.texi: Ditto. * doc/cppopts.texi: Ditto. * doc/generic.texi: Ditto. * doc/install.texi: Ditto. * doc/extend.texi: Ditto. * doc/invoke.texi: Ditto. * doc/md.texi: Ditto. * doc/rtl.texi: Ditto. * doc/tm.texi.in: Ditto. * doc/trouble.texi: Ditto. * doc/tm.texi: Regenerate. gcc/fortran/ChangeLog: * invoke.texi: Reorder index entries around @items. gcc/go/ChangeLog: * gccgo.texi: Reorder index entries around @items.
Diffstat (limited to 'gcc/doc/cppopts.texi')
-rw-r--r--gcc/doc/cppopts.texi8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
index 647d252..872629e 100644
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -77,9 +77,9 @@ This option is supported on GNU/Linux targets, most other Unix derivatives,
and also on x86 Cygwin and MinGW targets.
@opindex M
-@item -M
@cindex @command{make}
@cindex dependencies, @command{make}
+@item -M
Instead of outputting the result of preprocessing, output a rule
suitable for @command{make} describing the dependencies of the main
source file. The preprocessor outputs one @command{make} rule containing
@@ -308,15 +308,15 @@ location independent. This option also affects
@option{-ffile-prefix-map}.
@opindex fexec-charset
-@item -fexec-charset=@var{charset}
@cindex character set, execution
+@item -fexec-charset=@var{charset}
Set the execution character set, used for string and character
constants. The default is UTF-8. @var{charset} can be any encoding
supported by the system's @code{iconv} library routine.
@opindex fwide-exec-charset
-@item -fwide-exec-charset=@var{charset}
@cindex character set, wide execution
+@item -fwide-exec-charset=@var{charset}
Set the wide execution character set, used for wide string and
character constants. The default is one of UTF-32BE, UTF-32LE, UTF-16BE,
or UTF-16LE, whichever corresponds to the width of @code{wchar_t} and the
@@ -326,8 +326,8 @@ by the system's @code{iconv} library routine; however, you will have
problems with encodings that do not fit exactly in @code{wchar_t}.
@opindex finput-charset
-@item -finput-charset=@var{charset}
@cindex character set, input
+@item -finput-charset=@var{charset}
Set the input character set, used for translation from the character
set of the input file to the source character set used by GCC@. If the
locale does not specify, or GCC cannot get this information from the