On Mon, Jul 6, 2015 at 6:40 PM, Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
On Mon, Jul 06, 2015 at 05:41:34PM -0400, Igor Schein wrote:
> On Mon, Jul 6, 2015 at 11:00 AM, Bill Allombert <
> Bill.Allombert@math.u-bordeaux.fr> wrote:
>
> > On Mon, Jul 06, 2015 at 10:32:34AM -0400, Igor Schein wrote:
> > > On Mon, Jul 6, 2015 at 10:23 AM, Bill Allombert <
> > > Bill.Allombert@math.u-bordeaux.fr> wrote:
> > >
> > > > On Mon, Jul 06, 2015 at 10:12:17AM -0400, Igor Schein wrote:
> > > > > Package: pari
> > > > > Version: git
> > > > >
> > > > > $ uname -a
> > > > > SunOS solaris 5.11 11.2 i86pc i386 i86pc
> > > > > $ /opt/solarisstudio12.4/bin/CC  -c -I. -I../src/headers -KPIC -fast
> > > > > -fsimple=1  -erroff -o buch1.o ../src/basemath/buch1.c
> > > > > "../src/basemath/buch1.c", line 330: Error: Overloading ambiguity
> > between
> > > > > "std::log(double)" and "std::log(float)".
> > > > > "../src/basemath/buch1.c", line 405: Error: Overloading ambiguity
> > between
> > > > > "std::pow(double, double)" and "std::pow(double, int)".
> > > > > "../src/basemath/buch1.c", line 406: Error: Overloading ambiguity
> > between
> > > > > "std::pow(double, double)" and "std::pow(double, int)".
> > > > > 3 Error(s) detected.
> > > >
> > > > Did you use a C++ compiler ?  Overloading does not exist in C.
> > >
> > > Yes, CC is a C++ compiler.  However, there's no reason C++ build should
> > > fail on Solaris, right?
> >
> > Do you know what C++ standard level this compiler is compliant with ?
> >
> > Cheers,
> > Bill.
> >
>
> It's C++11

This is not consistent with my understanding of the standard:
in C++11 std::pow is defined in <cmath>, not in <math.h>, and PARI does not
include <cmath>.

Cheers,
Bill.

Nevertheless, when I use flag -std=c++03 to comply with the old standard, there's no issue compiling buch1.c.

There's a similar problem further up in the build process when using C++03:

$ /opt/solarisstudio12.4/bin/CC  -c -I. -I../src/headers -KPIC -fast -fsimple=1  -erroff -std=c++03 -o Hensel.o ../src/basemath/Hensel.c
"../src/basemath/Hensel.c", line 869: Error: Overloading ambiguity between "ZpX_ZpXQ_liftroot_ea(long*, long*, long*, long*, long, void*, extern "C" int(*)(void*,long*,long*))" and "ZpX_ZpXQ_liftroot_ea(long*, long*, long*, long*, long, void*, int(*)(void*,long*,long*))".
1 Error(s) detected.

Igor