[PATCH] Fix PR54659, include gmp.h from system.h

Richard Biener rguenther@suse.de
Fri Dec 21 13:15:00 GMT 2012


After the Ada fix including gmp.h from system.h is trivial
(by means of double-int.h it was included from almost everywhere
already)

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Ok for trunk?  (Go frontend "unfixed")

Thanks,
Richard.

2012-12-21  Richard Biener  <rguenther@suse.de>

	PR bootstrap/54659
	* system.h: Include gmp.h.
	* tree-ssa-loop-niter.c: Do not include gmp.h here.
	* double-int.h: Likewise.
	* realmpfr.h: Likewise.

	fortran/
	* gfortran.h: Do not include gmp.h here.

Index: gcc/tree-ssa-loop-niter.c
===================================================================
*** gcc/tree-ssa-loop-niter.c	(revision 194659)
--- gcc/tree-ssa-loop-niter.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 38,44 ****
  #include "flags.h"
  #include "diagnostic-core.h"
  #include "tree-inline.h"
- #include "gmp.h"
  
  #define SWAP(X, Y) do { affine_iv *tmp = (X); (X) = (Y); (Y) = tmp; } while (0)
  
--- 38,43 ----
Index: gcc/double-int.h
===================================================================
*** gcc/double-int.h	(revision 194659)
--- gcc/double-int.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 20,29 ****
  #ifndef DOUBLE_INT_H
  #define DOUBLE_INT_H
  
- #ifndef GENERATOR_FILE
- #include <gmp.h>
- #endif
- 
  /* A large integer is currently represented as a pair of HOST_WIDE_INTs.
     It therefore represents a number with precision of
     2 * HOST_BITS_PER_WIDE_INT bits (it is however possible that the
--- 20,25 ----
Index: gcc/fortran/gfortran.h
===================================================================
*** gcc/fortran/gfortran.h	(revision 194659)
--- gcc/fortran/gfortran.h	(working copy)
*************** gfc_intrinsic_sym;
*** 1699,1705 ****
     EXPR_COMPCALL   Function (or subroutine) call of a procedure pointer
  		   component or type-bound procedure.  */
  
- #include <gmp.h>
  #include <mpfr.h>
  #include <mpc.h>
  #define GFC_RND_MODE GMP_RNDN
--- 1699,1704 ----
Index: gcc/realmpfr.h
===================================================================
*** gcc/realmpfr.h	(revision 194659)
--- gcc/realmpfr.h	(working copy)
***************
*** 22,28 ****
  #ifndef GCC_REALGMP_H
  #define GCC_REALGMP_H
  
- #include <gmp.h>
  #include <mpfr.h>
  #include <mpc.h>
  #include "real.h"
--- 22,27 ----
Index: gcc/system.h
===================================================================
*** gcc/system.h	(revision 194660)
--- gcc/system.h	(working copy)
*************** extern int vsnprintf(char *, size_t, con
*** 638,643 ****
--- 638,645 ----
  #include <dlfcn.h>
  #endif
  
+ #include <gmp.h>
+ 
  /* Get libiberty declarations.  */
  #include "libiberty.h"
  



More information about the Gcc-patches mailing list