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 picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92831C28D13 for ; Thu, 25 Aug 2022 15:03:33 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 78DD53CA2B5 for ; Thu, 25 Aug 2022 17:03:31 +0200 (CEST) Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 0824A3C8854 for ; Thu, 25 Aug 2022 17:03:19 +0200 (CEST) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 057B6200385 for ; Thu, 25 Aug 2022 17:03:18 +0200 (CEST) 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 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 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH v3] Many pages: Document fixed-width types with ISO C naming X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alejandro Colomar , linux-man , Rich Felker , Alexei Starovoitov , David Howells , Alexei Starovoitov , linux-arch , Zack Weinberg , Daniel Borkmann , Alex Colomar , Michael Kerrisk , Arnd Bergmann , GCC , LTP List , glibc , Greg Kroah-Hartman , LKML , Adhemerval Zanella , Linux API , bpf Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" 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) -- Mailing list info: https://lists.linux.it/listinfo/ltp 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 402B2C6498F for ; Thu, 25 Aug 2022 15:04:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242628AbiHYPED convert rfc822-to-8bit (ORCPT ); Thu, 25 Aug 2022 11:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242832AbiHYPDp (ORCPT ); Thu, 25 Aug 2022 11:03:45 -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 AD5F4B7760 for ; Thu, 25 Aug 2022 08:03:33 -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: linux-kernel@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)