Problem with __gmp_expr

Marc Glisse marc.glisse at
Wed Jan 22 15:29:12 UTC 2014

On Wed, 22 Jan 2014, Torbjorn Granlund wrote:

> Marc Glisse <marc.glisse at> writes:
>  By the way, do we have a policy about breaking binary compatibility?
>  In this case, mixing old and new objects could result in crashes
>  (almost certainly at -O0, seldom at -O3). It should be possible to
>  prevent this issue by renaming __gmp_unary_expr and __gmp_binary_expr
>  (say adding a '2' at the end). It wouldn't be 100%, but I think only
>  questionable code would break.
> I don't think we need to support compiling with one GMP release
> and with another, and then link the objects to some
> libgmpxx.{so,a}.

Ok, but note that the issue doesn't stop at mixing .o directly, linking 
with various .so (unless they used visibility options to isolate 
themselves) or .a that weren't compiled with the same version of gmpxx 
would break, so in practice that's really a forced recompile of any 
library using gmpxx, same as a completely new ABI.

Marc Glisse

More information about the gmp-devel mailing list