This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: avoiding "inexact" from x86 ceil / floor / trunc
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: <libc-alpha at sourceware dot org>, <nd at arm dot com>
- Date: Mon, 6 Jun 2016 15:45:37 +0000
- Subject: Re: RFC: avoiding "inexact" from x86 ceil / floor / trunc
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 20 dot 1605251423310 dot 2813 at digraph dot polyomino dot org dot uk> <5745C4A8 dot 2090002 at arm dot com>
On Wed, 25 May 2016, Szabolcs Nagy wrote:
> > My inclination is that handling the case of not caring about "inexact" is
> > better done in the compiler, in which case these functions can be inlined
> > rather than exporting separate versions from glibc. Unfortunately GCC
> > doesn't currently inline these functions in all the cases where it could
> > (or have an option to select TS 18661-1 semantics):
> >
>
> yes, if the compiler can handle this (and doesn't care about
> inexact by default for -std=c99/c11) that sounds acceptable.
GCC will now inline these functions without caring about "inexact" unless
-fno-fp-int-builtin-inexact is used (where the default is
-ffp-int-builtin-inexact, allowing "inexact" for noninteger arguments, for
all currently supported standard versions; if C2x incorporates the TS
18661-1 requirements, the default would then change for -std=c2x /
-std=gnu2x).
--
Joseph S. Myers
joseph@codesourcery.com