From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 581CE3857355 for ; Mon, 19 Sep 2022 07:38:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 581CE3857355 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663573107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pJ5K6dGhDjUs9MGcFxrEMRzQ4SLT2u0t8rgTCR1b6uc=; b=dBic0HoVdgbvVp1B7uqDmzxJadp2aYEBLL4AJDZr/2yZdYs4oqmFDwbOdRcEOdPQ2MtsB3 VhHOFM8fUMuA43Szlm8ToZz8RxSyNC56QFtinJt1c5bZn7G+B740vs27Z8s4HRIKJmekGR iX8cPecC4Ah0RyiBhJqqUGG7tYMrDCQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-182-mkLaT6HtM7eF4kQ5UV8a4A-1; Mon, 19 Sep 2022 03:38:25 -0400 X-MC-Unique: mkLaT6HtM7eF4kQ5UV8a4A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4D6BE185A79C; Mon, 19 Sep 2022 07:38:25 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F69840C6EC2; Mon, 19 Sep 2022 07:38:23 +0000 (UTC) From: Florian Weimer To: Joseph Myers Cc: Letu Ren , libc-alpha@sourceware.org Subject: Re: [PATCH v2] stdlib/strfrom: Change -NAN test to multiple possible results (bug 29501) References: <20220917061328.8620-1-fantasquex@gmail.com> <87tu5584od.fsf@oldenburg.str.redhat.com> Date: Mon, 19 Sep 2022 09:38:22 +0200 In-Reply-To: (Joseph Myers's message of "Sun, 18 Sep 2022 16:25:38 +0000") Message-ID: <875yhjizkh.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * 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? Thanks, Florian