From nobody Thu Aug 25 21:33:47 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MDGS14jqbz4ZZYh; Thu, 25 Aug 2022 21:33:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MDGS14JFKz3pt0; Thu, 25 Aug 2022 21:33:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 81AAE3C0199; Thu, 25 Aug 2022 21:33:47 +0000 (UTC) Date: Thu, 25 Aug 2022 21:33:47 +0000 From: Brooks Davis To: Konstantin Belousov Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 05c9a0158f68 - main - libc: Add strverscmp(3) and versionsort(3) Message-ID: <20220825213347.GA89898@spindle.one-eyed-alien.net> References: <202208250029.27P0TRwK091769@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MDGS14JFKz3pt0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 25, 2022 at 04:22:56AM +0300, Konstantin Belousov wrote: > On Thu, Aug 25, 2022 at 02:07:12AM +0100, Jessica Clarke wrote: > > On 25 Aug 2022, at 01:29, Konstantin Belousov wrote: > > > + const unsigned char *u1 =3D __DECONST(const unsigned char *, s1); > > > + const unsigned char *u2 =3D __DECONST(const unsigned char *, s2); > >=20 > > Why is __DECONST needed? Casting from const char * to const unsigned > > char * should never warn, surely? >=20 > I requested the use of __DECONST there. Nobody knows what would be next > trend in the C language breaking among compiler writers. We guarantee > that __DECONST() is adopted to whatever warnings are added. We're not going to add an obfuscated cast through uintptr_t for every change of signedness. That would be absurd and there is no reason to belive a future C would ever require it. -- Brooks --/04w6evG8XlLl3ft Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJjB+q6AAoJEKzQXbSebgfAlecIAJAUArVezHf+wshkh7moiyDY 5zpJlQd0sSZOgPNMJsh/ERgDd+g4n5aZd+POkn2RZlqGFfGdS039oYeHWYgv6RNJ 2EwQRuxcptRyUdNrqtoagEgOSAAXDsiGB2/wy88ScrA36YhoAeWLksRxfq7D6JUx 2Cvz+jqur88Uzdn5D8ygV7TjnbGMTAzKDxlEjRbEGYLCFmZz+KEElBqqxeBoeX8u fPUCldlmbdX4ET4++bJyesrGyN8UJTYOPVWXG1HGEQgob4JSwvfOmIfKCaR9c5Vt 36SBiu34MlWwcmyCXqiHO4IioczRsIMFYpcrrP5/KFvjf2Laeaq+SHQSbZZtVBE= =pfp1 -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--