Bill Allombert on Mon, 14 Sep 2009 22:53:36 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Problems with has_log2.c and has_exp2.c

On Mon, Sep 14, 2009 at 11:17:40AM +0200, Jeroen Demeyer wrote:
> Hello all,
> I had a problem compiling sage-4.1.1 with gcc-4.5.0 and it could be  
> traced back to a problem in PARI's Configure programs has_log2.c and  
> has_exp2.c (which are the same for pari-2.3.3 and pari-SVN).
> The short story is that I would propose to change these configure  
> programs to something like:
> #include <math.h>
> int main()
> {
>   double x = log2(2.0);
>   return 0;
> }

This used to be the case until revision 5501 when it was changed.
I suggest you read threads:

Maybe you will find a satisfying solution.

> I would also propose that config/get_cc checks for a "-std=gnu99" or  
> "-std=c99" option for the C compiler and adds it when compiling PARI.

PARI is optimised for gnu89 and should stay compatible with c89. Using c99
would disable some optimisations and we do not use any gnu99 extension.