public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR54659, include gmp.h from system.h
@ 2012-12-21 13:15 Richard Biener
  2012-12-21 13:17 ` Jakub Jelinek
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Richard Biener @ 2012-12-21 13:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: Diego Novillo, iant


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"
  

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
@ 2012-12-21 16:26 Dominique Dhumieres
  2012-12-21 19:03 ` Ian Lance Taylor
  2012-12-22  1:56 ` Gerald Pfeifer
  0 siblings, 2 replies; 18+ messages in thread
From: Dominique Dhumieres @ 2012-12-21 16:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: jakub, rguenther

I think revision 194665 breaks bootstrap on at least x86_64-apple-darwin10:

g++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../_clean/gcc -I../../_clean/gcc/build -I../../_clean/gcc/../include -I./../intl -I../../_clean/gcc/../libcpp/include -I/opt/mp/include  -I../../_clean/gcc/../libdecnumber -I../../_clean/gcc/../libdecnumber/dpd -I../libdecnumber -I../../_clean/gcc/../libbacktrace -DCLOOG_INT_GMP  -I/opt/mp/include  \
                -o build/genconstants.o ../../_clean/gcc/genconstants.c
In file included from ./bconfig.h:3:0,
                 from ../../_clean/gcc/genconstants.c:28:
./auto-host.h:1994:16: error: declaration does not declare anything [-fpermissive]
 #define rlim_t long
                ^
In file included from ../../_clean/gcc/genconstants.c:29:0:
../../_clean/gcc/system.h:502:34: error: declaration of C function 'const char* strsignal(int)' conflicts with
 extern const char *strsignal (int);
                                  ^
In file included from /opt/gcc/gcc4.8a/include/c++/4.8.0/cstring:44:0,
                 from ../../_clean/gcc/system.h:207,
                 from ../../_clean/gcc/genconstants.c:29:
/usr/include/string.h:136:7: error: previous declaration 'char* strsignal(int)' here
 char *strsignal(int sig);
       ^

TIA

Dominique

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-01-09  8:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-21 13:15 [PATCH] Fix PR54659, include gmp.h from system.h Richard Biener
2012-12-21 13:17 ` Jakub Jelinek
2012-12-21 16:00 ` Ian Lance Taylor
2013-01-08 18:50 ` H.J. Lu
2013-01-09  2:31   ` Iyer, Balaji V
2013-01-09  8:36   ` Richard Biener
2012-12-21 16:26 Dominique Dhumieres
2012-12-21 19:03 ` Ian Lance Taylor
2012-12-21 20:06   ` Dominique Dhumieres
2012-12-21 21:20   ` Dominique Dhumieres
2012-12-22  1:56 ` Gerald Pfeifer
2012-12-22  8:55   ` Richard Biener
2012-12-22  9:50     ` Andreas Schwab
2012-12-22 10:43       ` Richard Biener
2012-12-22 10:52         ` Dominique Dhumieres
2012-12-22 11:14           ` Richard Sandiford
2012-12-22 11:03         ` Andreas Schwab
2012-12-27 16:11           ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).