public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/26073] New: getpayload() has wrong return value
@ 2020-06-02 18:40 tydeman.fred at gmail dot com
2020-07-06 16:29 ` [Bug math/26073] " jsm28 at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: tydeman.fred at gmail dot com @ 2020-06-02 18:40 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26073
Bug ID: 26073
Summary: getpayload() has wrong return value
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: tydeman.fred at gmail dot com
Target Milestone: ---
/*
* getpayload() bug
* C2X has in F.10.13.1: If *x is not a NaN, the return result is -1.
*/
#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <math.h>
#include <stdio.h>
int main(void){
double d = 1.0;
d = getpayload( &d ); /* not a NaN argument */
if(-1.0 != d) (void)printf("Bug: d=%g\n", d);
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug math/26073] getpayload() has wrong return value
2020-06-02 18:40 [Bug math/26073] New: getpayload() has wrong return value tydeman.fred at gmail dot com
@ 2020-07-06 16:29 ` jsm28 at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2020-07-06 16:29 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=26073
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.32
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.32.
commit 6c010c5dde1735f93cc3a6597cdcc2b482af85f8
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Jul 6 16:18:02 2020 +0000
Use C2x return value from getpayload of non-NaN (bug 26073).
In TS 18661-1, getpayload had an unspecified return value for a
non-NaN argument, while C2x requires the return value -1 in that case.
This patch implements the return value of -1. I don't think this is
worth having a new symbol version that's an alias of the old one,
although occasionally we do that in such cases where the new function
semantics are a refinement of the old ones (to avoid programs relying
on the new semantics running on older glibc versions but not behaving
as intended).
Tested for x86_64 and x86; also ran math/ tests for aarch64 and
powerpc.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-06 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 18:40 [Bug math/26073] New: getpayload() has wrong return value tydeman.fred at gmail dot com
2020-07-06 16:29 ` [Bug math/26073] " jsm28 at gcc dot gnu.org
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).