This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [COMMITTED] Use C99 math macros
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 3 Jun 2015 15:41:44 +0000
- Subject: RE: [COMMITTED] Use C99 math macros
- Authentication-results: sourceware.org; auth=none
- References: <000201d09e0d$fdbc6490$f9352db0$ at com> <alpine dot DEB dot 2 dot 10 dot 1506031502290 dot 25695 at digraph dot polyomino dot org dot uk> <000601d09e11$f6ca4c70$e45ee550$ at com>
On Wed, 3 Jun 2015, Wilco Dijkstra wrote:
> > Joseph Myers wrote:
> > On Wed, 3 Jun 2015, Wilco Dijkstra wrote:
> >
> > > diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-finite.c b/sysdeps/ieee754/ldbl-opt/nldbl-
> > finite.c
> >
> > > - return __finite (x);
> > > + return finite (x);
> >
> > Are you sure about this change? "finite", as opposed to isfinite, is a
> > non-type-generic BSD function; I'd expect this to cause the "finite"
> > function name to be used for the call instead of __finite. (Using
> > isfinite here should be fine.)
>
> Good catch - that's a typo, I meant isfinite indeed. There are a few
> other calls to finite so I don't think it causes namespace issues:
I suspect the reason they don't cause namespace issues is that GCC knows
about this function and inlines it. But I'm pretty sure there's no good
reason for just these particular calls to do that; all calls should use
isfinite, and then we should teach GCC __builtin_isfinite to work by
bit-manipulation, and use it for the isfinite macro with recent-enough
GCC.
> [ I guess this file is dead: sysdeps/ieee754/support.c: if(!finite(x)) return(x); ]
Yes, that file should be removed (subject to testing the removal).
--
Joseph S. Myers
joseph@codesourcery.com