[issue3168] cmath test fails on Solaris 10

Mark Dickinson report at bugs.python.org
Sat Jul 5 22:10:34 CEST 2008


Mark Dickinson <dickinsm at gmail.com> added the comment:

> There is another, perhaps related issue on Solaris.  The compiler warns 
> that function  finite is implicitly defined.
>
> Commenting out this line in pyconfig.h as
>
> /* #define HAVE_FINITE 1 */
>
> make that warning go away.  If there is no function  finite, why is 
> HAVE_FINITE defined at all?

I don't think this is too serious.  My guess would be that both finite and 
isfinite (which is the C99-recommended way to spell finite) are 
implemented in libm, but that only isfinite is mentioned in math.h (or 
possibly that finite is mentioned is math.h but is ifdef'd out as a result 
of some particular compiler options).

So a code snippet that refers to 'finite' emits a warning, but compiles 
fine.  Hence the corresponding autoconf test passes, and autoconf sets 
HAVE_FINITE to 1.  And the Python build also emits a warning, but compiles 
and runs fine.

Could you take a look in the 'config.log' file after configuring and see 
whether the 'implicit definition of finite' warning is in there as well?

The right fix is probably to rework things to use 'isfinite' in preference 
to 'finite'.  I'm not sure that Windows has isfinite, though.

----------
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3168>
_______________________________________


More information about the Python-bugs-list mailing list