Changes needed to make gmp 4.2.1 build with GCC trunk

Richard Guenther rguenther at
Mon Sep 3 18:21:37 CEST 2007

On Mon, 3 Sep 2007, Torbjorn Granlund wrote:

>   > 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  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

Ah, indeed.  I forgot about the <cstdio> case (and I don't remember
if I hit it during the testsuite or the build).  But yes, the
above should work in general.

> 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.

I'll do.


Richard Guenther <rguenther at>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex

More information about the gmp-devel mailing list