From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id A61A7384D197 for ; Thu, 23 Feb 2023 08:51:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A61A7384D197 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PMmwV2BN4z9slJ; Thu, 23 Feb 2023 09:51:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1677142298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p5VC3rskkDzREmNiRlX+e1gBEu9VoIyyuvp+8st/RWY=; b=Xtm/rNnQpLQT20sbBYcWxvc1Bu0yj6asBmi4ga6gecMMU+s3Xf6jd4GeZ15km7FHV06ZA7 ZkpkTNpl32NjT5g5L8z/UANNNVeMAu3hjM5SBOEhoGjRld7kcqMNdJs8QXUlxIMA/wmakD 4s3dTu5+5NbLlQfzFJ4EdP9kRx3BPmoATHx2Kr8BWQOHmAqMx9yjXyLVbFD6y/zv1ir11r DYhLGGkDSw7nap/3V85vPR74/ySnX5/fV6sVRqkCpitkMSEob5L8PFYIxWqnk69OEkoOAl o8UecKEkc4je9bHxip22TKx/cUe64kelhEpSbcVFKbhsvspq4CitLQItTLLzog== References: <8850cffaffae7e85824576b7761e446df8731115.1674777149.git.arsen@aarsen.me> <874jrc94yg.fsf@euler.schwinge.homeip.net> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Thomas Schwinge Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 3/7] **/*.texi: Reorder index entries Date: Thu, 23 Feb 2023 09:44:57 +0100 In-reply-to: <874jrc94yg.fsf@euler.schwinge.homeip.net> Message-ID: <86pma0kbn1.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4PMmwV2BN4z9slJ X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Thomas, Thomas Schwinge writes: > Hi! > > On 2023-01-27T01:18:31+0100, Arsen Arsenovi=C4=87 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 =3D (); >> my @itemq =3D (); >> my @indxq =3D (); >> my $lstin =3D 0; >> >> while (<>) >> { >> push (@lineq, $_); >> if (/^\@[a-zA-Z0-9]{1,2}index\W/) >> { >> $lstin =3D @lineq; >> push (@indxq, $_); >> next; >> } >> if (/^\@itemx?\W/) >> { >> $lstin =3D @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 =3D (); >> @itemq =3D (); >> @indxq =3D (); >> $lstin =3D 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=C3=BC=C3=9Fe > 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 tar= gets. >> >> @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=C3=9Fe 2= 01, 80634 > M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3=A4ftsf= =C3=BChrer: Thomas > Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaft: M=C3=BCnchen; Registe= rgericht > M=C3=BCnchen, HRB 106955 Thanks, have a lovely day. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCY/cpEl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTLdAA/1P0Y3dIn0W9PX4xAQZVI4aS5mD4ro/sWZR0 ka7qNjR5AQCqDK55xvYERE2jZv6CuXVcwWoarnAWwGJ+0GlvELqfAA== =BaDX -----END PGP SIGNATURE----- --=-=-=--