GMP 5.1.1 make check fail on Solaris 11

Torbjorn Granlund tg at gmplib.org
Mon Feb 18 10:47:51 CET 2013


Marc Glisse <marc.glisse at inria.fr> writes:

  Switching to math.h seems like a good idea anyway. I don't know if any
  systems (even non-c99 ones) are missing trunc in math.h. If we want
  the test to pass on those, I could protect these few lines by #if
  __cplusplus>=201103L. That sounds like a safe solution to me. An
  alternative could be to have a small inline function my_trunc in the
  test that re-implements trunc. Or mix both solutions.
  
Does __cplusplus>=201103L give any information about the existence of
trunc in math.h?  (This is not meant with any sarcasm, I really know
very little of C++ and its interaction with C.)

We shouldn't be slaves under standards, but I think we should not use a
function which is not defined by the stardard level we require.  Using
it *conditionally* in the test suite is OK.  We do want to support
conservatively maintained Unices, where this might otherwise cause
problems.

-- 
Torbjörn


More information about the gmp-bugs mailing list