From 953bee7c4a084245ae19ffb3b56e8a4685548a36 Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Sun, 8 Jul 2012 09:55:02 +0000 Subject: [PATCH] gfortran.h: Do not include coretypes.h here. * gfortran.h: Do not include coretypes.h here. Make it an error to include this before coretypes.h * openmp.c: Include coretypes.h. * interface.c: Likewise. * intrinsic.c: Likewise. * symbol.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * matchexp.c: Likewise. * dump-parse-tree.c: Likewise. * array.c: Likewise. * constructor.c: Likewise. * error.c: Likewise. * data.c: Likewise. * expr.c: Likewise. * module.c: Likewise. * scanner.c: Likewise. * bbt.c: Likewise. * io.c: Likewise. * frontend-passes.c: Likewise. * resolve.c: Likewise. * st.c: Likewise. * target-memory.c: Likewise. * match.c: Likewise. * arith.c: Likewise. * parse.c: Likewise. * check.c: Likewise. * dependency.c: Likewise. * primary.c: Likewise. * misc.c: Likewise. * simplify.c: Likewise. From-SVN: r189357 --- gcc/fortran/ChangeLog | 34 ++++++++++++++++++++++++++++++++++ gcc/fortran/arith.c | 1 + gcc/fortran/array.c | 1 + gcc/fortran/bbt.c | 1 + gcc/fortran/check.c | 1 + gcc/fortran/class.c | 1 + gcc/fortran/constructor.c | 1 + gcc/fortran/data.c | 1 + gcc/fortran/decl.c | 1 + gcc/fortran/dependency.c | 1 + gcc/fortran/dump-parse-tree.c | 1 + gcc/fortran/error.c | 1 + gcc/fortran/expr.c | 1 + gcc/fortran/frontend-passes.c | 1 + gcc/fortran/gfortran.h | 5 ++++- gcc/fortran/interface.c | 1 + gcc/fortran/intrinsic.c | 1 + gcc/fortran/io.c | 1 + gcc/fortran/match.c | 1 + gcc/fortran/matchexp.c | 1 + gcc/fortran/misc.c | 1 + gcc/fortran/module.c | 1 + gcc/fortran/openmp.c | 1 + gcc/fortran/parse.c | 1 + gcc/fortran/primary.c | 1 + gcc/fortran/resolve.c | 1 + gcc/fortran/scanner.c | 1 + gcc/fortran/simplify.c | 1 + gcc/fortran/st.c | 1 + gcc/fortran/symbol.c | 1 + gcc/fortran/target-memory.c | 1 + 31 files changed, 67 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3d85f29fd82..8a2a767cb3b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,37 @@ +2012-07-08 Steven Bosscher + + * gfortran.h: Do not include coretypes.h here. + Make it an error to include this before coretypes.h + * openmp.c: Include coretypes.h. + * interface.c: Likewise. + * intrinsic.c: Likewise. + * symbol.c: Likewise. + * class.c: Likewise. + * decl.c: Likewise. + * matchexp.c: Likewise. + * dump-parse-tree.c: Likewise. + * array.c: Likewise. + * constructor.c: Likewise. + * error.c: Likewise. + * data.c: Likewise. + * expr.c: Likewise. + * module.c: Likewise. + * scanner.c: Likewise. + * bbt.c: Likewise. + * io.c: Likewise. + * frontend-passes.c: Likewise. + * resolve.c: Likewise. + * st.c: Likewise. + * target-memory.c: Likewise. + * match.c: Likewise. + * arith.c: Likewise. + * parse.c: Likewise. + * check.c: Likewise. + * dependency.c: Likewise. + * primary.c: Likewise. + * misc.c: Likewise. + * simplify.c: Likewise. + 2012-07-05 Mikael Morin PR fortran/53732 diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 53a9dad42fe..38ba2711d12 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "arith.h" diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index b36d517cff7..51528b410f6 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "match.h" #include "constructor.h" diff --git a/gcc/fortran/bbt.c b/gcc/fortran/bbt.c index a78467be8b7..000f04bcbf8 100644 --- a/gcc/fortran/bbt.c +++ b/gcc/fortran/bbt.c @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" typedef struct gfc_treap diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 7d505d5e9d9..407052f655d 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "intrinsic.h" diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index c71aa4a7c48..fc083dcb092 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "constructor.h" diff --git a/gcc/fortran/constructor.c b/gcc/fortran/constructor.c index 600488d640f..182d00d165d 100644 --- a/gcc/fortran/constructor.c +++ b/gcc/fortran/constructor.c @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "constructor.h" diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c index 67da371ad54..a55b67e074f 100644 --- a/gcc/fortran/data.c +++ b/gcc/fortran/data.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "data.h" #include "constructor.h" diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 26b5059cd9f..c3644b6d8f8 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "match.h" #include "parse.h" diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index a2cf21d65f1..108815a44d9 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "dependency.h" #include "constructor.h" diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 7f1d28fd7c9..26c5201f065 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "constructor.h" diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index e9308374ac6..25d3cba9750 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 0b38cacad94..a107369f23e 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "arith.h" #include "match.h" diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index fc32e56dfc6..437ed7ec175 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "arith.h" #include "flags.h" diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index caa23bd6388..6d75e632088 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -29,13 +29,16 @@ along with GCC; see the file COPYING3. If not see multiple header files. Besides, Microsoft's winnt.h was 250k last time I looked, so by comparison this is perfectly reasonable. */ +#ifndef GCC_CORETYPES_H +#error "gfortran.h must be included after coretypes.h" +#endif + /* Declarations common to the front-end and library are put in libgfortran/libgfortran_frontend.h */ #include "libgfortran.h" #include "intl.h" -#include "coretypes.h" #include "input.h" #include "splay-tree.h" diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 34e1ad7f88b..6f40ba76e68 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -67,6 +67,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "match.h" #include "arith.h" diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 88d4636bd71..a7ab56ee74f 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "intrinsic.h" diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 7caadc5056c..3bc427d6159 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "match.h" diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 3d63510b00b..f86916a9c22 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "match.h" diff --git a/gcc/fortran/matchexp.c b/gcc/fortran/matchexp.c index cd70dc0f758..12d5b2dcbab 100644 --- a/gcc/fortran/matchexp.c +++ b/gcc/fortran/matchexp.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "arith.h" #include "match.h" diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c index 012364ae774..60c3cf1ddd3 100644 --- a/gcc/fortran/misc.c +++ b/gcc/fortran/misc.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 60a74cacca4..6fe23a28578 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -68,6 +68,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "arith.h" #include "match.h" diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index f5a58779c0c..e1ffa6b49f7 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "match.h" diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 54c6fc1010e..ad4e89e9a90 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include +#include "coretypes.h" #include "gfortran.h" #include "match.h" #include "parse.h" diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 41e2fa81efb..2e71024db4f 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "arith.h" diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 0434e0804c7..5be1857ef79 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "obstack.h" diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 120d55022b8..4fad58b9148 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" #include "toplev.h" /* For set_src_pwd. */ #include "debug.h" diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 1578db19b94..c7145d6eb96 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "arith.h" diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c index 932c9428af8..ed379fc44af 100644 --- a/gcc/fortran/st.c +++ b/gcc/fortran/st.c @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "gfortran.h" gfc_code new_st; diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 6ca4ca33014..378f83c23dd 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "gfortran.h" #include "parse.h" diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c index 63878959b47..637811e0965 100644 --- a/gcc/fortran/target-memory.c +++ b/gcc/fortran/target-memory.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" #include "flags.h" #include "machmode.h" #include "tree.h" -- 2.30.2