From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3599C6498F for ; Thu, 25 Aug 2022 15:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242828AbiHYPEN convert rfc822-to-8bit (ORCPT ); Thu, 25 Aug 2022 11:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242771AbiHYPDt (ORCPT ); Thu, 25 Aug 2022 11:03:49 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A644FB7777 for ; Thu, 25 Aug 2022 08:03:38 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-6-CLGAEFtmMmq-sFQCCbZ85g-1; Thu, 25 Aug 2022 16:03:04 +0100 X-MC-Unique: CLGAEFtmMmq-sFQCCbZ85g-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Thu, 25 Aug 2022 16:01:31 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.040; Thu, 25 Aug 2022 16:01:31 +0100 From: David Laight To: 'Joseph Myers' , Linus Torvalds CC: Florian Weimer , Greg Kroah-Hartman , Alejandro Colomar , Alexei Starovoitov , Alex Colomar , Alexei Starovoitov , linux-man , Daniel Borkmann , "Zack Weinberg" , LKML , glibc , GCC , bpf , LTP List , Linux API , linux-arch , "Cyril Hrubis" , David Howells , Arnd Bergmann , Rich Felker , Adhemerval Zanella , Michael Kerrisk Subject: RE: [PATCH v3] Many pages: Document fixed-width types with ISO C naming Thread-Topic: [PATCH v3] Many pages: Document fixed-width types with ISO C naming Thread-Index: AQHYuJCLMClw4u4WnUme2jwTdxYRD62/tSSA Date: Thu, 25 Aug 2022 15:01:31 +0000 Message-ID: <5e10ac07e63e41639b3113d12c264447@AcuMS.aculab.com> References: <20210423230609.13519-1-alx.manpages@gmail.com> <20220824185505.56382-1-alx.manpages@gmail.com> <87ilmgddui.fsf@oldenburg.str.redhat.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org From: Joseph Myers > Sent: 25 August 2022 15:39 > > On Thu, 25 Aug 2022, Linus Torvalds wrote: > > > That's a small detail that yes, we've tried to avoid the absolute > > humongous mess that the C standard library has with their horrendous > > 'PRId*' mess, but honestly, it's just a tiny detail. > > I've not yet implemented it for glibc or for GCC format checking, but C23 > adds 'wN' format length modifiers so you will be able to e.g. use "%w64d" > with printf to print an int64_t and won't need those PRI macros any more. Is that meant to work regardless of whether the type is int, long or long long provided the size is correct? Or does it require the compiler know which type inttypes.h uses for uint32_t and uint64_t? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)