Illegal subtraction in tmp-dive_1.s

Marc Glisse marc.glisse at
Fri Apr 17 23:03:43 CEST 2009

On Fri, 17 Apr 2009, Torbjorn Granlund wrote:

> I think our C++ experts have more to say about Sun's C++ compiler.  Marc
> and others have fought with several versions of it, but found out that
> they all failed compiling GMP.  Marc, am I right here?

No, gmp-4.3.0, with --enable-cxx (with or without -library=stlport4 in 
CXXFLAGS), compiles fine and passes all tests on linux x86_64 (I have 
copied the two files modified for sqr_basecase from the repo) with the 
latest version of Sun's compiler. (I am not sure since when 
-library=stlport4 is not required anymore, that is surprising)
I don't know if there are more C++ problems on solaris, but if so it is 
likely to be bugs in gmp (missing std:: or wrong #include).

> (There are some problems with GMP's configure in that it does not always
> use the same ABI for C and C++.  That typically shows up as cxx category
> check failures.)

No, the C vs C++ problem in configure was that configure tests for the 
support of features such as __attribute__((const)) for the C compiler and 
never checks whether the C++ compiler also supports them. There is no ABI 
issue. This bug in configure, assuming it is still there, does not seem to 
cause any problem with the latest version of the compiler.

> GCC works fine under Solaris.

Some days you need to believe it hard to make it happen... But yes, it 
does work ok.

Marc Glisse

More information about the gmp-discuss mailing list