Hi Thomas, Thomas Schwinge writes: > Hi! > > On 2023-01-27T01:18:31+0100, Arsen Arsenović via Gcc-patches wrote: >> Much like the previous commit, this change is mostly mechanical > > I find it helpful to see in the Git commit log some kind of rationale, > instead of just the almost-useless GNU ChangeLog snippets. ;-) Yes, fair enough. I forget that many will lack the lots of out-of-band context that went into this change. I'll push relevant amendments to my repository. >> 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. > > Assuming that the script is safe to run automatically (no manual > intervention necessary), I wonder: should that go into the GCC test suite > (say, like 'gcc.src/maintainers.exp') or GCC build process (say, like > 'gcc/Makefile.in:s-tm-texi'), to make sure that we're not regressing this > again? The script I wrote is a bit too dumb (there are, for instance, a few hunks which I manually revert after running the script, because they relate to comments, for instance), which is also why I skipped the Ada manuals (the script would reformat a lot of code that is semantically correct in terms of the problem this patchset is meant to be addressing). I was considering adding a warning to makeinfo to detect when indices are placed in "odd" positions, such as on the ends of paragraphs, in order to detect these errors; I haven't had the opportunity to do that yet, though. I do agree that it'd be nice to automatically detect this. >> 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: > > > Grüße > Thomas > > >> gcc/d/ChangeLog: >> >> * implement-d.texi: Reorder index entries around @items. >> [...] > >> --- a/gcc/d/implement-d.texi >> +++ b/gcc/d/implement-d.texi >> @@ -126,11 +126,11 @@ The following attributes are supported on most targets. >> >> @table @code >> >> +@cindex @code{alloc_size} function attribute >> +@cindex @code{alloc_size} variable attribute >> @item @@(gcc.attributes.alloc_size (@var{sizeArgIdx})) >> @itemx @@(gcc.attributes.alloc_size (@var{sizeArgIdx}, @var{numArgIdx})) >> @itemx @@(gcc.attributes.alloc_size (@var{sizeArgIdx}, @var{numArgIdx}, @var{zeroBasedNumbering})) >> -@cindex @code{alloc_size} function attribute >> -@cindex @code{alloc_size} variable attribute >> >>[...] > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 > München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas > Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht > München, HRB 106955 Thanks, have a lovely day. -- Arsen Arsenović