From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id E2B5E3858284 for ; Wed, 21 Sep 2022 16:44:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E2B5E3858284 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,333,1654588800"; d="scan'208";a="83270411" Received: from unknown (HELO orw-gwy-01-in.mentorg.com) ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 21 Sep 2022 08:34:53 -0800 IronPort-SDR: z8a5qYNwwILMsfRb7fszOt9dEAr/a+bZI7IyB1GHZbiDWbQiwaTvhBs/9IeWqDPV0RN70nWK0Q LSoz87vS+DiIX3dOvVIaUeeoyGYa5YlxVWEK1/gUEcRrJCP7nXmJLoYSBa1onbsvfKWSiJjQXM zfLLjDszvJXMyknD/6j4IQFQ/3t+KClxDoYwIDU7iQ3gmMP8mNyX2EGP099ZsgknkaTTivvx2v qeO7XYlgNyewVbKvO9KaNx4mBh33ecqIpLQzzFP3jckuAsMiatZxvN3tgmwg/y5R7kKDkHZl/+ a8I= Date: Wed, 21 Sep 2022 16:34:48 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Florian Weimer CC: Letu Ren , Subject: Re: [PATCH v2] stdlib/strfrom: Change -NAN test to multiple possible results (bug 29501) In-Reply-To: <875yhjizkh.fsf@oldenburg.str.redhat.com> Message-ID: References: <20220917061328.8620-1-fantasquex@gmail.com> <87tu5584od.fsf@oldenburg.str.redhat.com> <875yhjizkh.fsf@oldenburg.str.redhat.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3111.1 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 19 Sep 2022, Florian Weimer via Libc-alpha wrote: > * Joseph Myers: > > > On Sun, 18 Sep 2022, Florian Weimer wrote: > > > >> I think the conversion to double is required because according to the > >> quote from ISO/IEC TS 18661-1:2014 in the bug, strfromf is defined in > >> terms of snprintf, and calling snprintf promotes float arguments that do > >> not correspond to a declared parameter to double as part of the default > >> argument promotions. > > > > I don't think reading as literally passed to the variable-arguments > > function snprintf is very helpful, considering that the strfrom functions > > are supported for types that have no corresponding printf format (and > > supporting e.g. strfromf128 is one motivation for having these functions). > > That is, the equivalence to snprintf should be considered to be for the > > semantics of conversion to character strings, rather than for applying > > default argument promotions. > > Ah, so a bug in TS. Can the text still be fixed, or is this impossible > because it's a TS? I've noted it as something to consider submitting as an NB comment on the C2x CD ballot. TS 18661-1, -2 and -3 will be superseded by C2x (and thus hopefully withdrawn at their next systematic review after C2x). There should be subsequent revisions of -4 (the parts not merged into C2x, plus new functions from IEEE 754-2019) and -5, updated to apply to C2x. -- Joseph S. Myers joseph@codesourcery.com