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.7 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9010 invoked from network); 31 May 2023 14:27:59 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 31 May 2023 14:27:59 -0000 Received: (qmail 16326 invoked by uid 550); 31 May 2023 14:27:56 -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 16288 invoked from network); 31 May 2023 14:27:55 -0000 Date: Wed, 31 May 2023 10:27:44 -0400 From: Rich Felker To: Jens Gustedt Cc: musl@lists.openwall.com Message-ID: <20230531142743.GB4163@brightrain.aerifal.cx> References: <1c8e850ed3190af39b9e3f501d79899d438e7292.1685536608.git.Jens.Gustedt@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c8e850ed3190af39b9e3f501d79899d438e7292.1685536608.git.Jens.Gustedt@inria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [C23 128 bit 4/4] C23: implement proper support for int128_t and uint128_t On Wed, May 31, 2023 at 04:15:50PM +0200, Jens Gustedt wrote: > By implementing support for w128 length specifiers for printf and > scanf, the only final bit that we need to be able to support these > types officially as extended integer type and map them to the > fixed-width types are the integer literals. In C23, the new types > `_IntBit(N)` and their literals are mandatory. Most commonly they will > support N >= 128. The maximum value for N can be queried with > `BITINT_MAXWIDTH`. If we have such literals, use them to construct the > constants for `[U]INT128_C` and provide the rest of the macros for > these types. Unless the rules in C23 changed, I don't think yoou can define uintN_t where N is larger than width of intmax_t; these can only be accessible as _BitInt types not intN_t. (This was the whole reason _BitInt was added, no?) Rich