GCC and GMP 5.0.1

Torbjorn Granlund tg at gmplib.org
Sat Feb 26 23:28:31 CET 2011


"Steve M. Robbins" <steve at sumost.ca> writes:

  I'm curious if any distributions have begun shipping with GMP 5?
  Debian Linux's GMP (which I maintain) is presently 4.3.2 and we're
  having a bit of a debate whether to upgrade to GMP 5.
  
  GCC uses GMP internally and there is a concern that the upgrade could
  cause a regression in GCC.  Debian builds on more than a dozen
  architectures and there are a couple of GCC versions current amongst
  the architectures.
  
It is an interesting idea of GMP causing trouble for GCC...

  Any experience good or bad with building GCC using GMP 5 would
  be appreciated.
  
You need to understand that GMP is something such anachronistic as
carefully designed, carefully written, and carefully tested software.

The likelihood that GCC's constant folding should strike a GMP bug is
extremely slim.  If it actually happens, it will with almost 100%
certainty be due to that GCC miscompiled GMP.  Fortunately, GMP's test
suite covers all GMP code, so if people check for such miscompiles
before using their freshly compiled GMP, they should be safe.  (There is
a non-zero likelyhood that several GCC bugs collude in making the tests
miss library miscompiles...)

-- 
Torbjörn


More information about the gmp-discuss mailing list