diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2023-02-23 11:27:11 +0100 |
---|---|---|
committer | Gerald Pfeifer <gerald@pfeifer.com> | 2023-02-23 23:42:01 +0100 |
commit | f33d7a88d069d169bbe76da8e5c52de17f68ca05 (patch) | |
tree | 6d399142c972278067733d030a73fb2e807af488 /gcc/doc/tm.texi | |
parent | f83e76c3f998c8708fe2ddca16ae3f317c39c37a (diff) | |
download | gcc-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/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index c6c8919..09eab41 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4970,9 +4970,9 @@ function's arguments that this function should pop is available in @end deftypefn @itemize @bullet -@item @findex pretend_args_size @findex crtl->args.pretend_args_size +@item A region of @code{crtl->args.pretend_args_size} bytes of uninitialized space just underneath the first argument arriving on the stack. (This may not be at the very start of the allocated stack region @@ -4997,8 +4997,8 @@ boundary, to contain the local variables of the function. On some machines, this region and the save area may occur in the opposite order, with the save area closer to the top of the stack. -@item @cindex @code{ACCUMULATE_OUTGOING_ARGS} and stack frames +@item Optionally, when @code{ACCUMULATE_OUTGOING_ARGS} is defined, a region of @code{crtl->outgoing_args_size} bytes to be used for outgoing argument lists of the function. @xref{Stack Arguments}. |