| Bill Allombert on Fri, 26 Jun 2009 22:24:05 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Pari svn on MSVC |
On Fri, Jun 26, 2009 at 08:06:38PM +0100, Jason Moxham wrote:
> Hi
>
> I'm trying to get Pari svn running under MSVC 32bit , we allready have
> Pari-2.4.2-alpha running under MSVC 32bit with/without MPIR/GMP.
>
> The file
> /src/kernel/none/mp.c
> has minor buglet which stops compilation on MSVC
> this diff corrects the problem
>
>
> $ diff -u ../pari/src/kernel/none/mp.c mp.c
> --- ../pari/src/kernel/none/mp.c 2009-06-26 20:02:43.788784600 +0100
> +++ mp.c 2009-06-26 17:26:16.037784600 +0100
> @@ -1480,10 +1480,13 @@
> GEN u = gel(V,i);
> if (signe(u))
> {
> + GEN ap;
> + GEN up;
> + long lu;
> LOCAL_OVERFLOW;
> - GEN ap = int_W(a,s);
> - GEN up = int_LSW(u);
> - long lu = lgefint(u)-2;
> + ap = int_W(a,s);
> + up = int_LSW(u);
> + lu = lgefint(u)-2;
> *ap-- = addll(*ap, *up--);
> for (j=1; j<lu; j++)
> *ap-- = addllx(*ap, *up--);
>
> MSVC doesn't like it when LOCAL_OVERFLOW is empty , as the declarations
> are not at the beginning of the block.
You means the semi-comma breaks the compilation in C89 mode ? Yes that must
be fixed (done in revision r11787, thanks!)
Please note that having LOCAL_OVERFLOW empty cause a performance penalty.
Cheers,
Bill.