Changes needed to make gmp 4.2.1 build with GCC trunk

Torbjorn Granlund tg-this-will-bounce-but-I-am-subscribed-to-the-list-honest at swox.com
Mon Sep 3 18:03:53 CEST 2007


  > I worry about backwards compatibility of the C++ change.
  >
  > Is <cstdio> available since the dawn of C++, or when was it added?

  <cstdlib> that is.  Yes, <cstdlib> is required by the ISO C++ standard,
  documented in "20.4.6 C Library".  Though only calloc, malloc, free
  and realloc are explicitly listed it says "The contents are the same
  as the Standard C library header <stdlib.h>, ..."

<cstdlib> doesn't worry me, since we already include that in other GMP
files.

You also added an include of <cstdio> to gmp-h.in.  I think that
should be the responsibility of the user, though, just like for C.  We
now have

  #if defined (__cplusplus)
  extern "C" {
  #ifdef _GMP_H_HAVE_FILE
  using std::FILE;
  #endif
  #endif

later in gmp-h.in.

  > The inline change is protected by __GNUC_STDC_INLINE__.  Is
  > that in the official FSF gcc releases?

  Yes, it was retroactively added to the 4.1 release and is
  available for all 4.2 and 4.3 versions.  From the documentation:

Thanks, I'll apply the suggested patch.

I am rolling another RC for GMP 4.2.2 later today or tomorrow.  Please
try it.  It will be announced on the gmp-announce mailing list.

-- 
Torbjörn


More information about the gmp-devel mailing list