From: Joseph Myers <joseph@codesourcery.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Letu Ren <fantasquex@gmail.com>, <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2] stdlib/strfrom: Change -NAN test to multiple possible results (bug 29501)
Date: Wed, 21 Sep 2022 16:34:48 +0000 [thread overview]
Message-ID: <alpine.DEB.2.22.394.2209211632310.57900@digraph.polyomino.org.uk> (raw)
In-Reply-To: <875yhjizkh.fsf@oldenburg.str.redhat.com>
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
prev parent reply other threads:[~2022-09-21 16:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 6:13 Letu Ren
2022-09-18 5:32 ` Joseph Myers
2022-09-18 8:31 ` Florian Weimer
2022-09-18 8:54 ` Letu Ren
2022-09-18 16:25 ` Joseph Myers
2022-09-19 7:38 ` Florian Weimer
2022-09-21 10:36 ` Letu Ren
2022-09-21 16:34 ` Joseph Myers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2209211632310.57900@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=fantasquex@gmail.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).