This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] adjust sprintf range for AIX QNaN output (PR 86571)
- From: Martin Sebor <msebor at gmail dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Sat, 4 Aug 2018 16:19:48 -0600
- Subject: Re: [PATCH] adjust sprintf range for AIX QNaN output (PR 86571)
- References: <email@example.com>
On 08/02/2018 01:46 PM, Martin Sebor wrote:
The recently added test gcc.dg/torture/builtin-sprintf.c
to verify that the sprintf result computed by GCC matches
libc's for Infinity and NaN has been failing on AIX which
formats NaN as either QNaN or SNaN, contrary to C/POSIX
requirements. The attached tweak adjusts the result
computed by GCC to include the AIX format. If there are
no objections I'll commit the tweak later this week and
backport it to GCC 8 the next.
I have committed this change as r263312.
In the longer term, I think it might be best to introduce an OS
target hook to describe sprintf implementation-defined details
like the format of infinite values (i.e., inf or infinity, nan
or qnan/snan), and perhaps also %p format and anything else that
might be relevant.
I'll wait a bit before backporting it GCC 8 and 7 in case there
are any comments/concerns.