From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17324 invoked from network); 20 Sep 2022 15:20:27 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2022 15:20:27 -0000 Received: (qmail 12027 invoked by uid 550); 20 Sep 2022 15:20:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11993 invoked from network); 20 Sep 2022 15:20:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version; bh=gUeHpvbSbYqbiow/E7U3Qd/OyaAJhzYBcwSVJoGhbk8=; b=kq1+90cjbiy3arbwzQSmptJBq7qedLUwnQ1m4z4qWZUSGHzP5iAGVwGr g6GgmAWujYbC4+HWe9/i/fsU78WR6QIoksqTELdhEkp/mUQZrQ2lvFTba m3Lg6s86tIzPNeKHVdoUVau3fz6iZUzPN8hKtEVqI3OpAXp3DxAb7rInf Q=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.93,330,1654552800"; d="scan'208";a="24218319" Date: Tue, 20 Sep 2022 17:20:11 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com Message-ID: <20220920172011.755587cd@inria.fr> In-Reply-To: <20220920144617.GQ9709@brightrain.aerifal.cx> References: <20220919175952.GB2158779@port70.net> <20220919181039.GS9709@brightrain.aerifal.cx> <20220920111934.4dcdc985@inria.fr> <20220920122829.GM9709@brightrain.aerifal.cx> <20220920152929.66a33c9b@inria.fr> <20220920135553.GO9709@brightrain.aerifal.cx> <20220920160803.6bd6a422@inria.fr> <20220920141517.GP9709@brightrain.aerifal.cx> <20220920162236.38485fe3@inria.fr> <20220920162728.76fd9836@inria.fr> <20220920144617.GQ9709@brightrain.aerifal.cx> Organization: inria.fr X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) X-Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAACRQTFRFERslNjAsLTE9Ok9wUk9TaUs8iWhSrYZkj42Rz6aD3sGZ MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/rxvW.UGXndc85PkfMDP4gGm"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] [PATCH] vfprintf: support C2x %b and %B conversion specifiers --Sig_/rxvW.UGXndc85PkfMDP4gGm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rich, on Tue, 20 Sep 2022 10:46:18 -0400 you (Rich Felker ) wrote: > On Tue, Sep 20, 2022 at 04:27:28PM +0200, J=E2=82=91=E2=82=99=E2=82=9B Gu= stedt wrote: > > on Tue, 20 Sep 2022 16:22:36 +0200 you (J=E2=82=91=E2=82=99=E2=82=9B Gu= stedt > > ) wrote: > > =20 > > > There is a feature test macro for the maximum width of bit-precise > > > integers, `BITINT_MAXWIDTH`. It is guaranteed to be at least > > > `ULLONG_WIDTH` but can (and will) be larger on many platforms. =20 > >=20 > > e.g on my ubuntu-nothing-fancy machine I get > >=20 > > clang -E -dM -xc /dev/null | grep -i bitint > > #define __BITINT_MAXWIDTH__ 128 =20 >=20 > As I understand it, that gives the application knowledge of what > bit-precise types the compiler can provide to it, but doesn't do > anything to tell the application what wN modifiers printf can be > expected to support. If it were required to support wN for > N=3D=3DBITINT_MAXWIDTH that would at least be something to go from, but I > see no such requirement and I'm not sure it's desirable (it means you > can't let the compiler offer larger BITINT_MAXWIDTH, but would have to > define it as what libc supports). >=20 > I think a separate macro indicating what printf supports is needed to > solve this problem well. That's an excellent point. It would be good if we filed a national body comment for the ballot period to get such a thing in. J=E2=82=91=E2=82=99=E2=82=9B --=20 :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS ::: :: :::::::::::::::::::::: gsm France : +33 651400183 :: :: ::::::::::::::: gsm international : +49 15737185122 :: :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/rxvW.UGXndc85PkfMDP4gGm Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCYynaKwAKCRAP0+hp2tU3 4if6AJ0dwnoogSZAJ1FCjX0yDR1pbUOpwwCdGlN7kyesYHKeJTFiuGuH9zppKJo= =F4wd -----END PGP SIGNATURE----- --Sig_/rxvW.UGXndc85PkfMDP4gGm--