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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23408 invoked from network); 2 Jun 2023 15:37:39 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 2 Jun 2023 15:37:39 -0000 Received: (qmail 21962 invoked by uid 550); 2 Jun 2023 15:37:36 -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 21921 invoked from network); 2 Jun 2023 15:37:36 -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=X29+/uWszcM1VShz8ghlktASV863NOkfABVfwHVSBco=; b=pje4BFNDQWNXdypnBfnV58+kHupSxErWi3pqkBIXtpiH0vlQLOAO6fzb 6GV+OD62gS9c7jNXlE0iXf3cqR5mrXCZdxxgFzQYFsWHDE2HlXp/DHsfp vCslubf+7lLwtrtTTkLd4FMbKZX2dTPWgJv9+oQjJ7HuXxzuLe8aK6T7d g=; Authentication-Results: mail2-relais-roc.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="6.00,213,1681164000"; d="scan'208";a="110991296" Date: Fri, 2 Jun 2023 17:37:22 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com, jens.gustedt@posteo.eu Message-ID: <20230602173722.7404abd7@inria.fr> In-Reply-To: <20230602151639.GS4163@brightrain.aerifal.cx> References: <5a2c0731967330e9a3832d531ea4212e223aaead.1685429467.git.Jens.Gustedt@inria.fr> <20230602143759.GQ4163@brightrain.aerifal.cx> <20230602170926.41dca6e7@inria.fr> <20230602151639.GS4163@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_/T+gfb22DQUiD7cpXm/h6qSs"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] [C23 printf 2/3] C23: implement the wN length specifiers for printf --Sig_/T+gfb22DQUiD7cpXm/h6qSs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rich, on Fri, 2 Jun 2023 11:16:40 -0400 you (Rich Felker ) wrote: > Note that this is kinda a problem for scanf where va_arg is used > with void*, except that POSIX, conveniently, explicitly requires the > C (compiler) implementation accept mismatched va_arg types when both > types are pointers. I think that was a change for C23, we here have something similar in 7.16.1.1 =E2=80=94 one type is pointer to qualified or unqualified `void` and the other is a pointer to a qualified or unqualified character type; Unfortunately, C can not go easily further than that, because other than in POSIX there might be data pointers that have different representations. (We could have said something like pointers with the same width and representation, though.) Also for the new `nullptr_t` type we now have =E2=80=94 or, the type of the next argument is `nullptr_t` and type is a pointer type that has the same representation and alignment requirements as a pointer to a character type. Which then makes it defined behavior to pass in a `nullptr` sentinel, where it previously was UB when `NULL` was for example `OL` or so, or when the application passed in an explicit zero instead of `NULL`. J=E2=82=91=E2=82=99=E2=82=9B --=20 :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Universit=C3=A9 de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus :: :: :::::::::::::::::::::::::::::::::::: =E2=98=8E +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/T+gfb22DQUiD7cpXm/h6qSs Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCZHoMswAKCRAP0+hp2tU3 4tYkAJ46IQDNfgLjuvFCtXYIVWGvdOhy3wCeMWJ1z6FmkfiFlrPxz6Jnv85RS3w= =hqJf -----END PGP SIGNATURE----- --Sig_/T+gfb22DQUiD7cpXm/h6qSs--