public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* do not include diagnostic-core.h in toplev.h
@ 2010-07-06  5:50 Manuel López-Ibáñez
  2010-07-06 14:31 ` Tobias Burnus
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Manuel López-Ibáñez @ 2010-07-06  5:50 UTC (permalink / raw)
  To: Gcc Patch List; +Cc: Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

This patch moves diagnostic-core.h out of toplev.h. Since toplev.h is
included everywhere, it would be an enormous work to check every file
to ensure which one is actually needed. Followup patches can
progressively remove either toplev.h or diagnostic-core.h (or
sometimes even both). Therefore, my patch just includes
diagnostic-core.h whenever toplev.h is included, except in a few
places where I removed the unused includes by hand before giving up.
In particular, the C/C++ frontends did not need to include additional
headers because diagnostic-core.h is included by c-common.h, c-tree.h
and cp-tree.h (Not sure whether this is correct but it was like this
before my patch).

Bootstrapped and regression tested on x86_64-linux-gnu.

OK?

2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* toplev.h: Do not include diagnostic-core.h.
	Include diagnostic-core.h in every file that includes toplev.h.
	* c-tree.h: Do not include toplev.h.

c-family/
	* c-common.h: Include diagnostic-core.h. Error if already
	included.
	* c-semantics.c: Do not define GCC_DIAG_STYLE here.
cp/
	* cp-tree.h: Do not include toplev.h.
	
java/
	* Include diagnostic-core.h in every file that includes toplev.h.
ada/
	* Include diagnostic-core.h in every file that includes toplev.h.
fortran/
	* Include diagnostic-core.h in every file that includes toplev.h.
lto/
	* Include diagnostic-core.h in every file that includes toplev.h.

[-- Attachment #2: toplev.diff --]
[-- Type: text/x-diff, Size: 97701 bytes --]

Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c	(revision 161805)
+++ gcc/tree-vrp.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-pass.h"
 #include "tree-dump.h"
 #include "timevar.h"
 #include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "intl.h"
 #include "cfgloop.h"
 #include "tree-scalar-evolution.h"
 #include "tree-ssa-propagate.h"
Index: gcc/attribs.c
===================================================================
--- gcc/attribs.c	(revision 161805)
+++ gcc/attribs.c	(working copy)
@@ -23,12 +23,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
-#include "toplev.h"
-#include "output.h"
+#include "diagnostic-core.h"
 #include "ggc.h"
 #include "tm_p.h"
 #include "cpplib.h"
 #include "target.h"
 #include "langhooks.h"
Index: gcc/sched-ebb.c
===================================================================
--- gcc/sched-ebb.c	(revision 161805)
+++ gcc/sched-ebb.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 \f
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/fwprop.c
===================================================================
--- gcc/fwprop.c	(revision 161805)
+++ gcc/fwprop.c	(working copy)
@@ -21,10 +21,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 #include "timevar.h"
 #include "rtl.h"
 #include "tm_p.h"
Index: gcc/lto-symtab.c
===================================================================
--- gcc/lto-symtab.c	(revision 161805)
+++ gcc/lto-symtab.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree.h"
 #include "gimple.h"
 #include "ggc.h"
 #include "lambda.h"	/* gcd */
Index: gcc/ira-conflicts.c
===================================================================
--- gcc/ira-conflicts.c	(revision 161805)
+++ gcc/ira-conflicts.c	(working copy)
@@ -30,10 +30,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "insn-config.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "params.h"
 #include "df.h"
 #include "sparseset.h"
 #include "ira-int.h"
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c	(revision 161805)
+++ gcc/targhooks.c	(working copy)
@@ -54,10 +54,11 @@ along with GCC; see the file COPYING3.  
 #include "machmode.h"
 #include "rtl.h"
 #include "tree.h"
 #include "expr.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "function.h"
 #include "target.h"
 #include "tm_p.h"
 #include "target-def.h"
Index: gcc/tree-dump.c
===================================================================
--- gcc/tree-dump.c	(revision 161805)
+++ gcc/tree-dump.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "splay-tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
 #include "langhooks.h"
 #include "tree-iterator.h"
Index: gcc/tree-ssa-uninit.c
===================================================================
--- gcc/tree-ssa-uninit.c	(revision 161805)
+++ gcc/tree-ssa-uninit.c	(working copy)
@@ -38,10 +38,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-inline.h"
 #include "timevar.h"
 #include "hashtab.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "timevar.h"
 
 /* This implements the pass that does predicate aware warning on uses of
    possibly uninitialized variables. The pass first collects the set of
Index: gcc/tree-ssa-loop-niter.c
===================================================================
--- gcc/tree-ssa-loop-niter.c	(revision 161805)
+++ gcc/tree-ssa-loop-niter.c	(working copy)
@@ -37,10 +37,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
 #include "tree-data-ref.h"
 #include "params.h"
 #include "flags.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-inline.h"
 #include "gmp.h"
 
 #define SWAP(X, Y) do { affine_iv *tmp = (X); (X) = (Y); (Y) = tmp; } while (0)
Index: gcc/c-family/c-semantics.c
===================================================================
--- gcc/c-family/c-semantics.c	(revision 161805)
+++ gcc/c-family/c-semantics.c	(working copy)
@@ -25,14 +25,10 @@ along with GCC; see the file COPYING3.  
 #include "tm.h"
 #include "tree.h"
 #include "function.h"
 #include "splay-tree.h"
 #include "c-common.h"
-/* In order for the format checking to accept the C frontend
-   diagnostic framework extensions, you must define this token before
-   including toplev.h.  */
-#define GCC_DIAG_STYLE __gcc_cdiag__
 #include "toplev.h"
 #include "flags.h"
 #include "output.h"
 #include "tree-iterator.h"
 
Index: gcc/c-family/c-common.h
===================================================================
--- gcc/c-family/c-common.h	(revision 161805)
+++ gcc/c-family/c-common.h	(working copy)
@@ -26,13 +26,19 @@ along with GCC; see the file COPYING3.  
 #include "cpplib.h"
 #include "ggc.h"
 
 /* In order for the format checking to accept the C frontend
    diagnostic framework extensions, you must include this file before
-   toplev.h, not after.  The C front end formats are a subset of those
+   diagnostic-core.h, not after.  The C front end formats are a subset of those
    for C++, so they are the appropriate set to use in common code;
    cp-tree.h overrides this for C++.  */
+#if defined(GCC_DIAGNOSTIC_CORE_H)
+#error \
+In order for the format checking to accept the C front end diagnostic \
+framework extensions, you must include this file before diagnostic-core.h \
+never after.
+#endif
 #ifndef GCC_DIAG_STYLE
 #define GCC_DIAG_STYLE __gcc_cdiag__
 #endif
 #include "diagnostic-core.h"
 
Index: gcc/java/typeck.c
===================================================================
--- gcc/java/typeck.c	(revision 161805)
+++ gcc/java/typeck.c	(working copy)
@@ -31,10 +31,11 @@ The Free Software Foundation is independ
 #include "obstack.h"
 #include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
 #include "convert.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 
 static tree convert_ieee_real_to_integer (tree, tree);
 static tree parse_signature_type (const unsigned char **,
Index: gcc/java/mangle_name.c
===================================================================
--- gcc/java/mangle_name.c	(revision 161805)
+++ gcc/java/mangle_name.c	(working copy)
@@ -29,10 +29,11 @@ The Free Software Foundation is independ
 #include "coretypes.h"
 #include "jcf.h"
 #include "tree.h"
 #include "java-tree.h"
 #include "obstack.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 static void append_unicode_mangled_name (const char *, int);
 #ifndef HAVE_AS_UTF8
 static int  unicode_mangling_length (const char *, int);
Index: gcc/java/class.c
===================================================================
--- gcc/java/class.c	(revision 161805)
+++ gcc/java/class.c	(working copy)
@@ -30,10 +30,11 @@ The Free Software Foundation is independ
 #include "tree.h"
 #include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
 #include "obstack.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "parse.h"
 #include "function.h"
 #include "ggc.h"
Index: gcc/java/decl.c
===================================================================
--- gcc/java/decl.c	(revision 161805)
+++ gcc/java/decl.c	(working copy)
@@ -27,10 +27,11 @@ The Free Software Foundation is independ
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
 #include "libfuncs.h"
Index: gcc/java/jcf-parse.c
===================================================================
--- gcc/java/jcf-parse.c	(revision 161805)
+++ gcc/java/jcf-parse.c	(working copy)
@@ -32,10 +32,11 @@ The Free Software Foundation is independ
 #include "flags.h"
 #include "java-except.h"
 #include "input.h"
 #include "javaop.h"
 #include "java-tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "parse.h"
 #include "ggc.h"
 #include "debug.h"
 #include "assert.h"
Index: gcc/java/constants.c
===================================================================
--- gcc/java/constants.c	(revision 161805)
+++ gcc/java/constants.c	(working copy)
@@ -26,10 +26,11 @@ The Free Software Foundation is independ
 #include "coretypes.h"
 #include "tm.h"
 #include "jcf.h"
 #include "tree.h"
 #include "java-tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 
 static void set_constant_entry (CPool *, int, int, jword);
 static int find_tree_constant (CPool *, int, tree);
Index: gcc/java/resource.c
===================================================================
--- gcc/java/resource.c	(revision 161805)
+++ gcc/java/resource.c	(working copy)
@@ -26,10 +26,11 @@ The Free Software Foundation is independ
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "java-tree.h"
 #include "jcf.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "parse.h"
 #include "function.h"
 #include "ggc.h"
Index: gcc/java/except.c
===================================================================
--- gcc/java/except.c	(revision 161805)
+++ gcc/java/except.c	(working copy)
@@ -30,10 +30,11 @@ The Free Software Foundation is independ
 #include "java-tree.h"
 #include "javaop.h"
 #include "java-opcodes.h"
 #include "jcf.h"
 #include "java-except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-iterator.h"
 
 
 static void expand_start_java_handler (struct eh_range *);
Index: gcc/java/verify-glue.c
===================================================================
--- gcc/java/verify-glue.c	(revision 161805)
+++ gcc/java/verify-glue.c	(working copy)
@@ -31,10 +31,11 @@ The Free Software Foundation is independ
 #include "parse.h"
 
 #include "verify.h"
 #include "java-tree.h"
 #include "java-except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 void *
 vfy_alloc (size_t bytes)
 {
Index: gcc/java/mangle.c
===================================================================
--- gcc/java/mangle.c	(revision 161805)
+++ gcc/java/mangle.c	(working copy)
@@ -30,10 +30,11 @@ The Free Software Foundation is independ
 #include "coretypes.h"
 #include "jcf.h"
 #include "tree.h"
 #include "java-tree.h"
 #include "obstack.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "langhooks-def.h"
 #include "tm.h"         /* FIXME: For gcc_obstack_init from defaults.h.  */
 
Index: gcc/java/expr.c
===================================================================
--- gcc/java/expr.c	(revision 161805)
+++ gcc/java/expr.c	(working copy)
@@ -33,10 +33,11 @@ The Free Software Foundation is independ
 #include "javaop.h"
 #include "java-opcodes.h"
 #include "jcf.h"
 #include "java-except.h"
 #include "parse.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "tree-iterator.h"
 #include "target.h"
 
Index: gcc/java/boehm.c
===================================================================
--- gcc/java/boehm.c	(revision 161805)
+++ gcc/java/boehm.c	(working copy)
@@ -30,10 +30,11 @@ The Free Software Foundation is independ
 #include "double-int.h"
 #include "tm.h"
 #include "tree.h"
 #include "java-tree.h"
 #include "parse.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 static void mark_reference_fields (tree, double_int *, unsigned int,
 				   int *, int *, int *, HOST_WIDE_INT *);
 
Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c	(revision 161805)
+++ gcc/optabs.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 /* Include insn-config.h before expr.h so that HAVE_conditional_move
    is properly defined.  */
 #include "insn-config.h"
Index: gcc/postreload-gcse.c
===================================================================
--- gcc/postreload-gcse.c	(revision 161805)
+++ gcc/postreload-gcse.c	(working copy)
@@ -20,10 +20,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 #include "rtl.h"
 #include "tree.h"
 #include "tm_p.h"
Index: gcc/postreload.c
===================================================================
--- gcc/postreload.c	(revision 161805)
+++ gcc/postreload.c	(working copy)
@@ -38,10 +38,11 @@ along with GCC; see the file COPYING3.  
 #include "basic-block.h"
 #include "reload.h"
 #include "recog.h"
 #include "output.h"
 #include "cselib.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "except.h"
 #include "tree.h"
 #include "timevar.h"
 #include "tree-pass.h"
Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c	(revision 161805)
+++ gcc/rtlanal.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "hard-reg-set.h"
 #include "insn-config.h"
 #include "recog.h"
Index: gcc/ddg.c
===================================================================
--- gcc/ddg.c	(revision 161805)
+++ gcc/ddg.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/tree-phinodes.c
===================================================================
--- gcc/tree-phinodes.c	(revision 161805)
+++ gcc/tree-phinodes.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 #include "tree.h"
 #include "rtl.h"	/* FIXME: Only for ceil_log2, of all things...  */
 #include "ggc.h"
 #include "basic-block.h"
 #include "tree-flow.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "gimple.h"
 
 /* Rewriting a function into SSA form can create a huge number of PHIs
    many of which may be thrown away shortly after their creation if jumps
Index: gcc/lists.c
===================================================================
--- gcc/lists.c	(revision 161805)
+++ gcc/lists.c	(working copy)
@@ -21,10 +21,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "ggc.h"
 
 static void free_list (rtx *, rtx *);
Index: gcc/cfghooks.c
===================================================================
--- gcc/cfghooks.c	(revision 161805)
+++ gcc/cfghooks.c	(working copy)
@@ -26,11 +26,11 @@ along with GCC; see the file COPYING3.  
 #include "tree.h"
 #include "rtl.h"
 #include "basic-block.h"
 #include "tree-flow.h"
 #include "timevar.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "cfgloop.h"
 
 /* A pointer to one of the hooks containers.  */
 static struct cfg_hooks *cfg_hooks;
 
Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c	(revision 161805)
+++ gcc/fold-const.c	(working copy)
@@ -51,10 +51,11 @@ along with GCC; see the file COPYING3.  
 #include "realmpfr.h"
 #include "rtl.h"
 #include "expr.h"
 #include "tm_p.h"
 #include "target.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "intl.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "langhooks.h"
Index: gcc/params.c
===================================================================
--- gcc/params.c	(revision 161805)
+++ gcc/params.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "params.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 /* An array containing the compiler parameters and their current
    values.  */
 
Index: gcc/cfg.c
===================================================================
--- gcc/cfg.c	(revision 161805)
+++ gcc/cfg.c	(working copy)
@@ -55,10 +55,11 @@ along with GCC; see the file COPYING3.  
 #include "regs.h"
 #include "flags.h"
 #include "output.h"
 #include "function.h"
 #include "except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "obstack.h"
 #include "timevar.h"
 #include "tree-pass.h"
Index: gcc/auto-inc-dec.c
===================================================================
--- gcc/auto-inc-dec.c	(revision 161805)
+++ gcc/auto-inc-dec.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "regs.h"
 #include "flags.h"
 #include "output.h"
 #include "function.h"
 #include "except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "expr.h"
 #include "timevar.h"
 #include "tree-pass.h"
Index: gcc/toplev.h
===================================================================
--- gcc/toplev.h	(revision 161805)
+++ gcc/toplev.h	(working copy)
@@ -21,11 +21,10 @@ along with GCC; see the file COPYING3.  
 
 #ifndef GCC_TOPLEV_H
 #define GCC_TOPLEV_H
 #include "input.h"
 #include "bversion.h"
-#include "diagnostic-core.h"
 
 /* If non-NULL, return one past-the-end of the matching SUBPART of
    the WHOLE string.  */
 #define skip_leading_substring(whole,  part) \
    (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
Index: gcc/reorg.c
===================================================================
--- gcc/reorg.c	(revision 161805)
+++ gcc/reorg.c	(working copy)
@@ -113,10 +113,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "expr.h"
 #include "function.h"
Index: gcc/real.c
===================================================================
--- gcc/real.c	(revision 161805)
+++ gcc/real.c	(working copy)
@@ -23,10 +23,11 @@
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "real.h"
 #include "realmpfr.h"
 #include "tm_p.h"
 #include "dfp.h"
Index: gcc/pretty-print.h
===================================================================
--- gcc/pretty-print.h	(revision 161805)
+++ gcc/pretty-print.h	(working copy)
@@ -301,11 +301,11 @@ extern void pp_base_clear_output_area (p
 extern const char *pp_base_formatted_text (pretty_printer *);
 extern const char *pp_base_last_position_in_text (const pretty_printer *);
 extern void pp_base_emit_prefix (pretty_printer *);
 extern void pp_base_append_text (pretty_printer *, const char *, const char *);
 
-/* This header may be included before toplev.h, hence the duplicate
+/* This header may be included before diagnostics-core.h, hence the duplicate
    definitions to allow for GCC-specific formats.  */
 #if GCC_VERSION >= 3005
 #define ATTRIBUTE_GCC_PPDIAG(m, n) __attribute__ ((__format__ (__gcc_diag__, m ,n))) ATTRIBUTE_NONNULL(m)
 #else
 #define ATTRIBUTE_GCC_PPDIAG(m, n) ATTRIBUTE_NONNULL(m)
Index: gcc/tree-vect-loop-manip.c
===================================================================
--- gcc/tree-vect-loop-manip.c	(revision 161805)
+++ gcc/tree-vect-loop-manip.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-dump.h"
 #include "cfgloop.h"
 #include "cfglayout.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-scalar-evolution.h"
 #include "tree-vectorizer.h"
 #include "langhooks.h"
 
Index: gcc/vec.c
===================================================================
--- gcc/vec.c	(revision 161805)
+++ gcc/vec.c	(working copy)
@@ -28,11 +28,11 @@ along with GCC; see the file COPYING3.  
 
 #include "system.h"
 #include "ggc.h"
 #include "vec.h"
 #include "coretypes.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "hashtab.h"
 
 struct vec_prefix
 {
   unsigned num;
Index: gcc/cp/cp-tree.h
===================================================================
--- gcc/cp/cp-tree.h	(revision 161805)
+++ gcc/cp/cp-tree.h	(working copy)
@@ -28,23 +28,22 @@ along with GCC; see the file COPYING3.  
 #include "hashtab.h"
 #include "vec.h"
 
 /* In order for the format checking to accept the C++ front end
    diagnostic framework extensions, you must include this file before
-   toplev.h, not after.  We override the definition of GCC_DIAG_STYLE
+   diagnostic-core.h, not after.  We override the definition of GCC_DIAG_STYLE
    in c-common.h.  */
 #undef GCC_DIAG_STYLE
 #define GCC_DIAG_STYLE __gcc_cxxdiag__
-#if defined(GCC_TOPLEV_H) || defined (GCC_C_COMMON_H)
+#if defined(GCC_DIAGNOSTIC_CORE_H) || defined (GCC_C_COMMON_H)
 #error \
 In order for the format checking to accept the C++ front end diagnostic \
-framework extensions, you must include this file before toplev.h and \
+framework extensions, you must include this file before diagnostic-core.h and \
 c-common.h, not after.
 #endif
-#include "toplev.h"
-#include "diagnostic.h"
 #include "c-family/c-common.h"
+#include "diagnostic.h"
 
 #include "name-lookup.h"
 
 /* Usage of TREE_LANG_FLAG_?:
    0: IDENTIFIER_MARKED (IDENTIFIER_NODEs)
Index: gcc/tree-ssa-ccp.c
===================================================================
--- gcc/tree-ssa-ccp.c	(revision 161805)
+++ gcc/tree-ssa-ccp.c	(working copy)
@@ -203,10 +203,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-pass.h"
 #include "tree-ssa-propagate.h"
 #include "value-prof.h"
 #include "langhooks.h"
 #include "target.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "dbgcnt.h"
 
 
 /* Possible lattice values.  */
Index: gcc/haifa-sched.c
===================================================================
--- gcc/haifa-sched.c	(revision 161805)
+++ gcc/haifa-sched.c	(working copy)
@@ -126,21 +126,21 @@ along with GCC; see the file COPYING3.  
 \f
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
 #include "function.h"
 #include "flags.h"
 #include "insn-config.h"
 #include "insn-attr.h"
 #include "except.h"
-#include "toplev.h"
 #include "recog.h"
 #include "sched-int.h"
 #include "target.h"
 #include "output.h"
 #include "params.h"
Index: gcc/dominance.c
===================================================================
--- gcc/dominance.c	(revision 161805)
+++ gcc/dominance.c	(working copy)
@@ -39,10 +39,11 @@
 #include "tm.h"
 #include "rtl.h"
 #include "hard-reg-set.h"
 #include "obstack.h"
 #include "basic-block.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "et-forest.h"
 #include "timevar.h"
 #include "vecprim.h"
 #include "pointer-set.h"
Index: gcc/dbxout.c
===================================================================
--- gcc/dbxout.c	(revision 161805)
+++ gcc/dbxout.c	(working copy)
@@ -79,10 +79,11 @@ along with GCC; see the file COPYING3.  
 #include "regs.h"
 #include "insn-config.h"
 #include "reload.h"
 #include "output.h"
 #include "dbxout.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "ggc.h"
 #include "debug.h"
 #include "function.h"
Index: gcc/tree-nomudflap.c
===================================================================
--- gcc/tree-nomudflap.c	(revision 161805)
+++ gcc/tree-nomudflap.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "output.h"
 #include "langhooks.h"
 #include "tree-mudflap.h"
 #include "tree-pass.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 
 
 /* This file contains placeholder functions, to be used only for
Index: gcc/modulo-sched.c
===================================================================
--- gcc/modulo-sched.c	(revision 161805)
+++ gcc/modulo-sched.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/caller-save.c
===================================================================
--- gcc/caller-save.c	(revision 161805)
+++ gcc/caller-save.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "basic-block.h"
 #include "df.h"
 #include "reload.h"
 #include "function.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "addresses.h"
 #include "output.h"
 #include "ggc.h"
Index: gcc/graph.c
===================================================================
--- gcc/graph.c	(revision 161805)
+++ gcc/graph.c	(working copy)
@@ -28,11 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "output.h"
 #include "function.h"
 #include "hard-reg-set.h"
 #include "obstack.h"
 #include "basic-block.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "graph.h"
 #include "emit-rtl.h"
 
 static const char *const graph_ext[] =
 {
Index: gcc/cse.c
===================================================================
--- gcc/cse.c	(revision 161805)
+++ gcc/cse.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "insn-config.h"
 #include "recog.h"
 #include "function.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "ggc.h"
 #include "timevar.h"
 #include "except.h"
Index: gcc/web.c
===================================================================
--- gcc/web.c	(revision 161805)
+++ gcc/web.c	(working copy)
@@ -36,10 +36,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 #include "rtl.h"
 #include "hard-reg-set.h"
 #include "flags.h"
Index: gcc/ira-color.c
===================================================================
--- gcc/ira-color.c	(revision 161805)
+++ gcc/ira-color.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "sbitmap.h"
 #include "bitmap.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "reload.h"
 #include "params.h"
 #include "df.h"
 #include "splay-tree.h"
Index: gcc/xcoffout.c
===================================================================
--- gcc/xcoffout.c	(revision 161805)
+++ gcc/xcoffout.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
 #include "flags.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "ggc.h"
 #include "target.h"
 #include "debug.h"
Index: gcc/gimple-low.c
===================================================================
--- gcc/gimple-low.c	(revision 161805)
+++ gcc/gimple-low.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-iterator.h"
 #include "tree-inline.h"
 #include "tree-flow.h"
 #include "flags.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-pass.h"
 
 /* The differences between High GIMPLE and Low GIMPLE are the
    following:
Index: gcc/c-tree.h
===================================================================
--- gcc/c-tree.h	(revision 161805)
+++ gcc/c-tree.h	(working copy)
@@ -21,11 +21,10 @@ along with GCC; see the file COPYING3.  
 
 #ifndef GCC_C_TREE_H
 #define GCC_C_TREE_H
 
 #include "c-family/c-common.h"
-#include "toplev.h"
 #include "diagnostic.h"
 
 /* struct lang_identifier is private to c-decl.c, but langhooks.c needs to
    know how big it is.  This is sanity-checked in c-decl.c.  */
 #define C_SIZEOF_STRUCT_LANG_IDENTIFIER \
Index: gcc/cfganal.c
===================================================================
--- gcc/cfganal.c	(revision 161805)
+++ gcc/cfganal.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "obstack.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "insn-config.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "vec.h"
 #include "vecprim.h"
 #include "bitmap.h"
Index: gcc/ifcvt.c
===================================================================
--- gcc/ifcvt.c	(revision 161805)
+++ gcc/ifcvt.c	(working copy)
@@ -33,10 +33,11 @@
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "expr.h"
 #include "output.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "cfgloop.h"
 #include "target.h"
 #include "timevar.h"
Index: gcc/cfgbuild.c
===================================================================
--- gcc/cfgbuild.c	(revision 161805)
+++ gcc/cfgbuild.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "output.h"
 #include "function.h"
 #include "except.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "timevar.h"
 #include "sbitmap.h"
 
 static void make_edges (basic_block, basic_block, int);
Index: gcc/tree-ssa-loop.c
===================================================================
--- gcc/tree-ssa-loop.c	(revision 161805)
+++ gcc/tree-ssa-loop.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "timevar.h"
 #include "cfgloop.h"
 #include "flags.h"
 #include "tree-inline.h"
 #include "tree-scalar-evolution.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-vectorizer.h"
 
 /* The loop superpass.  */
 
Index: gcc/predict.c
===================================================================
--- gcc/predict.c	(revision 161805)
+++ gcc/predict.c	(working copy)
@@ -41,10 +41,11 @@ along with GCC; see the file COPYING3.  
 #include "regs.h"
 #include "flags.h"
 #include "output.h"
 #include "function.h"
 #include "except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "expr.h"
 #include "predict.h"
 #include "coverage.h"
Index: gcc/dbgcnt.c
===================================================================
--- gcc/dbgcnt.c	(revision 161805)
+++ gcc/dbgcnt.c	(working copy)
@@ -20,10 +20,11 @@ along with GCC; see the file COPYING3.  
 See dbgcnt.def for usage information.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm.h"
 #include "rtl.h"
 #include "output.h"
 
Index: gcc/ada/gcc-interface/utils.c
===================================================================
--- gcc/ada/gcc-interface/utils.c	(revision 161805)
+++ gcc/ada/gcc-interface/utils.c	(working copy)
@@ -28,10 +28,11 @@
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
 #include "toplev.h"
+#include "diagnostic-core.h"
 #include "output.h"
 #include "ggc.h"
 #include "debug.h"
 #include "convert.h"
 #include "target.h"
Index: gcc/ada/gcc-interface/decl.c
===================================================================
--- gcc/ada/gcc-interface/decl.c	(revision 161805)
+++ gcc/ada/gcc-interface/decl.c	(working copy)
@@ -31,10 +31,11 @@
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "target.h"
 #include "expr.h"
 #include "tree-inline.h"
Index: gcc/sel-sched-ir.c
===================================================================
--- gcc/sel-sched-ir.c	(revision 161805)
+++ gcc/sel-sched-ir.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/tree-eh.c
===================================================================
--- gcc/tree-eh.c	(revision 161805)
+++ gcc/tree-eh.c	(working copy)
@@ -33,11 +33,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-iterator.h"
 #include "tree-pass.h"
 #include "timevar.h"
 #include "langhooks.h"
 #include "ggc.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "gimple.h"
 #include "target.h"
 
 /* In some instances a tree and a gimple need to be stored in a same table,
    i.e. in hash tables. This is a structure to do this. */
Index: gcc/fortran/trans-array.c
===================================================================
--- gcc/fortran/trans-array.c	(revision 161805)
+++ gcc/fortran/trans-array.c	(working copy)
@@ -78,10 +78,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For internal_error/fatal_error.  */
 #include "flags.h"
 #include "gfortran.h"
 #include "constructor.h"
 #include "trans.h"
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c	(revision 161805)
+++ gcc/fortran/trans-expr.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For fatal_error.  */
 #include "langhooks.h"
 #include "flags.h"
 #include "gfortran.h"
 #include "arith.h"
Index: gcc/fortran/trans-common.c
===================================================================
--- gcc/fortran/trans-common.c	(revision 161805)
+++ gcc/fortran/trans-common.c	(working copy)
@@ -96,10 +96,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For exact_log2.  */
 #include "output.h"	/* For decl_default_tls_model.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-types.h"
Index: gcc/fortran/trans-openmp.c
===================================================================
--- gcc/fortran/trans-openmp.c	(revision 161805)
+++ gcc/fortran/trans-openmp.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "gimple.h"	/* For create_tmp_var_raw.  */
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For internal_error.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-stmt.h"
 #include "trans-types.h"
Index: gcc/fortran/trans-const.c
===================================================================
--- gcc/fortran/trans-const.c	(revision 161805)
+++ gcc/fortran/trans-const.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "realmpfr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For fatal_error.  */
 #include "double-int.h"
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-const.h"
Index: gcc/fortran/trans.c
===================================================================
--- gcc/fortran/trans.c	(revision 161805)
+++ gcc/fortran/trans.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "tree-iterator.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For internal_error.  */
 #include "defaults.h"
 #include "flags.h"
 #include "gfortran.h"
 #include "trans.h"
Index: gcc/fortran/trans-types.c
===================================================================
--- gcc/fortran/trans-types.c	(revision 161805)
+++ gcc/fortran/trans-types.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "coretypes.h"
 #include "tree.h"
 #include "langhooks.h"	/* For iso-c-bindings.def.  */
 #include "target.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For rest_of_decl_compilation/fatal_error.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-types.h"
 #include "trans-const.h"
Index: gcc/fortran/scanner.c
===================================================================
--- gcc/fortran/scanner.c	(revision 161805)
+++ gcc/fortran/scanner.c	(working copy)
@@ -42,10 +42,11 @@ along with GCC; see the file COPYING3.  
    new characters and do a lot of jumping backwards.  */
 
 #include "config.h"
 #include "system.h"
 #include "gfortran.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For set_src_pwd.  */
 #include "debug.h"
 #include "flags.h"
 #include "cpp.h"
 
Index: gcc/fortran/trans-decl.c
===================================================================
--- gcc/fortran/trans-decl.c	(revision 161805)
+++ gcc/fortran/trans-decl.c	(working copy)
@@ -27,10 +27,11 @@ along with GCC; see the file COPYING3.  
 #include "tm.h"
 #include "tree.h"
 #include "tree-dump.h"
 #include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For announce_function/internal_error.  */
 #include "output.h"	/* For decl_default_tls_model.  */
 #include "target.h"
 #include "function.h"
 #include "flags.h"
Index: gcc/fortran/trans-io.c
===================================================================
--- gcc/fortran/trans-io.c	(revision 161805)
+++ gcc/fortran/trans-io.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For internal_error.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-stmt.h"
 #include "trans-array.h"
Index: gcc/fortran/convert.c
===================================================================
--- gcc/fortran/convert.c	(revision 161805)
+++ gcc/fortran/convert.c	(working copy)
@@ -38,10 +38,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "flags.h"
 #include "convert.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For error.  */
 #include "gfortran.h"
 #include "trans.h"
 
 /*
Index: gcc/fortran/trans-intrinsic.c
===================================================================
--- gcc/fortran/trans-intrinsic.c	(revision 161805)
+++ gcc/fortran/trans-intrinsic.c	(working copy)
@@ -26,10 +26,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"		/* For UNITS_PER_WORD.  */
 #include "tree.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For rest_of_decl_compilation/internal_error.  */
 #include "flags.h"
 #include "gfortran.h"
 #include "arith.h"
 #include "intrinsic.h"
Index: gcc/fortran/options.c
===================================================================
--- gcc/fortran/options.c	(revision 161805)
+++ gcc/fortran/options.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "params.h"
 #include "tree-inline.h"
 #include "gfortran.h"
 #include "target.h"
 #include "cpp.h"
+#include "diagnostic-core.h"
 #include "toplev.h"	/* For sorry.  */
 #include "tm.h"
 
 gfc_option_t gfc_option;
 
Index: gcc/ira-lives.c
===================================================================
--- gcc/ira-lives.c	(revision 161805)
+++ gcc/ira-lives.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "except.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "insn-config.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "params.h"
 #include "df.h"
 #include "sparseset.h"
 #include "ira-int.h"
Index: gcc/regmove.c
===================================================================
--- gcc/regmove.c	(revision 161805)
+++ gcc/regmove.c	(working copy)
@@ -38,10 +38,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
 #include "basic-block.h"
 #include "except.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "reload.h"
 #include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
Index: gcc/sel-sched-dump.c
===================================================================
--- gcc/sel-sched-dump.c	(revision 161805)
+++ gcc/sel-sched-dump.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/sdbout.c
===================================================================
--- gcc/sdbout.c	(revision 161805)
+++ gcc/sdbout.c	(working copy)
@@ -73,10 +73,11 @@ static GTY(()) bool sdbout_initialized;
 #include "regs.h"
 #include "flags.h"
 #include "insn-config.h"
 #include "reload.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "gsyms.h"
 #include "langhooks.h"
 #include "target.h"
Index: gcc/stor-layout.c
===================================================================
--- gcc/stor-layout.c	(revision 161805)
+++ gcc/stor-layout.c	(working copy)
@@ -29,10 +29,11 @@ along with GCC; see the file COPYING3.  
 #include "tm_p.h"
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "target.h"
 #include "langhooks.h"
 #include "regs.h"
Index: gcc/gcse.c
===================================================================
--- gcc/gcse.c	(revision 161805)
+++ gcc/gcse.c	(working copy)
@@ -141,10 +141,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 #include "rtl.h"
 #include "tree.h"
 #include "tm_p.h"
Index: gcc/alias.c
===================================================================
--- gcc/alias.c	(revision 161805)
+++ gcc/alias.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "flags.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "cselib.h"
 #include "splay-tree.h"
 #include "ggc.h"
 #include "langhooks.h"
Index: gcc/profile.c
===================================================================
--- gcc/profile.c	(revision 161805)
+++ gcc/profile.c	(working copy)
@@ -58,10 +58,11 @@ along with GCC; see the file COPYING3.  
 #include "output.h"
 #include "regs.h"
 #include "expr.h"
 #include "function.h"
 #include "basic-block.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "coverage.h"
 #include "value-prof.h"
 #include "tree.h"
 #include "cfghooks.h"
Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c	(revision 161805)
+++ gcc/tree-vect-loop.c	(working copy)
@@ -35,10 +35,11 @@ along with GCC; see the file COPYING3.  
 #include "cfglayout.h"
 #include "expr.h"
 #include "recog.h"
 #include "optabs.h"
 #include "params.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
 #include "tree-vectorizer.h"
 #include "target.h"
Index: gcc/ira-build.c
===================================================================
--- gcc/ira-build.c	(revision 161805)
+++ gcc/ira-build.c	(working copy)
@@ -30,10 +30,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "insn-config.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "params.h"
 #include "df.h"
 #include "output.h"
 #include "reload.h"
Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c	(revision 161805)
+++ gcc/tree-vect-data-refs.c	(working copy)
@@ -34,10 +34,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-dump.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
 #include "tree-vectorizer.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 /* Need to include rtl.h, expr.h, etc. for optabs.  */
 #include "expr.h"
 #include "optabs.h"
Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c	(revision 161805)
+++ gcc/gimplify.c	(working copy)
@@ -37,10 +37,11 @@ along with GCC; see the file COPYING3.  
 #include "hashtab.h"
 #include "flags.h"
 #include "function.h"
 #include "output.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "target.h"
 #include "pointer-set.h"
 #include "splay-tree.h"
 #include "vec.h"
Index: gcc/implicit-zee.c
===================================================================
--- gcc/implicit-zee.c	(revision 161805)
+++ gcc/implicit-zee.c	(working copy)
@@ -188,10 +188,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-config.h"
 #include "function.h"
 #include "expr.h"
 #include "insn-attr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "target.h"
 #include "timevar.h"
 #include "optabs.h"
 #include "insn-codes.h"
Index: gcc/calls.c
===================================================================
--- gcc/calls.c	(revision 161805)
+++ gcc/calls.c	(working copy)
@@ -30,11 +30,11 @@ along with GCC; see the file COPYING3.  
 #include "expr.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "function.h"
 #include "regs.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "output.h"
 #include "tm_p.h"
 #include "timevar.h"
 #include "sbitmap.h"
 #include "langhooks.h"
Index: gcc/tree-ssa-coalesce.c
===================================================================
--- gcc/tree-ssa-coalesce.c	(revision 161805)
+++ gcc/tree-ssa-coalesce.c	(working copy)
@@ -29,10 +29,11 @@ along with GCC; see the file COPYING3.  
 #include "bitmap.h"
 #include "tree-flow.h"
 #include "hashtab.h"
 #include "tree-dump.h"
 #include "tree-ssa-live.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 
 /* This set of routines implements a coalesce_list.  This is an object which
    is used to track pairs of ssa_names which are desirable to coalesce
Index: gcc/loop-doloop.c
===================================================================
--- gcc/loop-doloop.c	(revision 161805)
+++ gcc/loop-doloop.c	(working copy)
@@ -26,10 +26,11 @@ along with GCC; see the file COPYING3.  
 #include "rtl.h"
 #include "flags.h"
 #include "expr.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "cfgloop.h"
 #include "output.h"
 #include "params.h"
Index: gcc/expmed.c
===================================================================
--- gcc/expmed.c	(revision 161805)
+++ gcc/expmed.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tree.h"
 #include "tm_p.h"
 #include "flags.h"
Index: gcc/bt-load.c
===================================================================
--- gcc/bt-load.c	(revision 161805)
+++ gcc/bt-load.c	(working copy)
@@ -32,11 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "insn-attr.h"
 #include "function.h"
 #include "except.h"
 #include "tm_p.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "tree-pass.h"
 #include "recog.h"
 #include "df.h"
 
 /* Target register optimizations - these are performed after reload.  */
Index: gcc/ggc-common.c
===================================================================
--- gcc/ggc-common.c	(revision 161805)
+++ gcc/ggc-common.c	(working copy)
@@ -25,10 +25,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "hashtab.h"
 #include "ggc.h"
 #include "ggc-internal.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "params.h"
 #include "hosthooks.h"
 #include "hosthooks-def.h"
 #include "plugin.h"
Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c	(revision 161805)
+++ gcc/emit-rtl.c	(working copy)
@@ -36,10 +36,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tree.h"
 #include "tm_p.h"
 #include "flags.h"
Index: gcc/store-motion.c
===================================================================
--- gcc/store-motion.c	(revision 161805)
+++ gcc/store-motion.c	(working copy)
@@ -20,10 +20,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 #include "rtl.h"
 #include "tree.h"
 #include "tm_p.h"
Index: gcc/cselib.c
===================================================================
--- gcc/cselib.c	(revision 161805)
+++ gcc/cselib.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "insn-config.h"
 #include "recog.h"
 #include "function.h"
 #include "emit-rtl.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "tree-pass.h"
Index: gcc/tree-cfgcleanup.c
===================================================================
--- gcc/tree-cfgcleanup.c	(revision 161805)
+++ gcc/tree-cfgcleanup.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 #include "tm.h"
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "flags.h"
 #include "function.h"
 #include "ggc.h"
 #include "langhooks.h"
Index: gcc/cfgcleanup.c
===================================================================
--- gcc/cfgcleanup.c	(revision 161805)
+++ gcc/cfgcleanup.c	(working copy)
@@ -41,10 +41,11 @@ along with GCC; see the file COPYING3.  
 #include "timevar.h"
 #include "output.h"
 #include "insn-config.h"
 #include "flags.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "cselib.h"
 #include "params.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/simplify-rtx.c
===================================================================
--- gcc/simplify-rtx.c	(revision 161805)
+++ gcc/simplify-rtx.c	(working copy)
@@ -33,10 +33,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-config.h"
 #include "recog.h"
 #include "function.h"
 #include "expr.h"
 #include "toplev.h"
+#include "diagnostic-core.h"
 #include "output.h"
 #include "ggc.h"
 #include "target.h"
 
 /* Simplification and canonicalization of RTL.  */
Index: gcc/explow.c
===================================================================
--- gcc/explow.c	(revision 161805)
+++ gcc/explow.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tree.h"
 #include "tm_p.h"
 #include "flags.h"
Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c	(revision 161805)
+++ gcc/tree-ssa-live.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "gimple-pretty-print.h"
 #include "bitmap.h"
 #include "tree-flow.h"
 #include "tree-dump.h"
 #include "tree-ssa-live.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "debug.h"
 #include "flags.h"
 
 #ifdef ENABLE_CHECKING
Index: gcc/lto/lto-elf.c
===================================================================
--- gcc/lto/lto-elf.c	(revision 161805)
+++ gcc/lto/lto-elf.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include <gelf.h>
 #include "lto.h"
 #include "tm.h"
 #include "libiberty.h"
Index: gcc/lto/lto-coff.c
===================================================================
--- gcc/lto/lto-coff.c	(revision 161805)
+++ gcc/lto/lto-coff.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "lto.h"
 #include "tm.h"
 #include "libiberty.h"
 #include "ggc.h"
Index: gcc/lto/lto-lang.c
===================================================================
--- gcc/lto/lto-lang.c	(revision 161805)
+++ gcc/lto/lto-lang.c	(working copy)
@@ -30,10 +30,11 @@ along with GCC; see the file COPYING3.  
 #include "debug.h"
 #include "lto-tree.h"
 #include "lto.h"
 #include "tree-inline.h"
 #include "gimple.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *);
 static tree handle_const_attribute (tree *, tree, tree, int, bool *);
 static tree handle_malloc_attribute (tree *, tree, tree, int, bool *);
Index: gcc/lto/lto-macho.c
===================================================================
--- gcc/lto/lto-macho.c	(revision 161805)
+++ gcc/lto/lto-macho.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "lto.h"
 #include "tm.h"
 #include "libiberty.h"
 #include "lto-streamer.h"
Index: gcc/loop-iv.c
===================================================================
--- gcc/loop-iv.c	(revision 161805)
+++ gcc/loop-iv.c	(working copy)
@@ -58,10 +58,11 @@ along with GCC; see the file COPYING3.  
 #include "basic-block.h"
 #include "cfgloop.h"
 #include "expr.h"
 #include "intl.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "df.h"
 #include "hashtab.h"
 
 /* Possible return values of iv_get_reaching_def.  */
Index: gcc/ggc-zone.c
===================================================================
--- gcc/ggc-zone.c	(revision 161805)
+++ gcc/ggc-zone.c	(working copy)
@@ -27,10 +27,11 @@ along with GCC; see the file COPYING3.  
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "flags.h"
 #include "ggc.h"
 #include "ggc-internal.h"
 #include "timevar.h"
Index: gcc/ggc-page.c
===================================================================
--- gcc/ggc-page.c	(revision 161805)
+++ gcc/ggc-page.c	(working copy)
@@ -23,11 +23,12 @@ along with GCC; see the file COPYING3.  
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
 #include "tm_p.h"
-#include "toplev.h"
+#include "toplev.h" /* exact_log2 */
+#include "diagnostic-core.h"
 #include "flags.h"
 #include "ggc.h"
 #include "ggc-internal.h"
 #include "timevar.h"
 #include "params.h"
Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c	(revision 161805)
+++ gcc/varasm.c	(working copy)
@@ -37,10 +37,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "expr.h"
 #include "hard-reg-set.h"
 #include "regs.h"
 #include "output.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "hashtab.h"
 #include "ggc.h"
 #include "langhooks.h"
 #include "tm_p.h"
Index: gcc/tree-vect-patterns.c
===================================================================
--- gcc/tree-vect-patterns.c	(revision 161805)
+++ gcc/tree-vect-patterns.c	(working copy)
@@ -34,10 +34,11 @@ along with GCC; see the file COPYING3.  
 #include "optabs.h"
 #include "params.h"
 #include "tree-data-ref.h"
 #include "tree-vectorizer.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 /* Function prototypes */
 static void vect_pattern_recog_1
   (gimple (* ) (gimple, tree *, tree *), gimple_stmt_iterator);
Index: gcc/ira.c
===================================================================
--- gcc/ira.c	(revision 161805)
+++ gcc/ira.c	(working copy)
@@ -317,11 +317,11 @@ along with GCC; see the file COPYING3.  
 #include "timevar.h"
 #include "tree-pass.h"
 #include "output.h"
 #include "except.h"
 #include "reload.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "integrate.h"
 #include "ggc.h"
 #include "ira-int.h"
 
 
Index: gcc/sched-deps.c
===================================================================
--- gcc/sched-deps.c	(revision 161805)
+++ gcc/sched-deps.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 \f
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c	(revision 161805)
+++ gcc/tree-ssa.c	(working copy)
@@ -40,11 +40,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-inline.h"
 #include "timevar.h"
 #include "hashtab.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 
 /* Pointer map of variable mappings, keyed by edge.  */
 static struct pointer_map_t *edge_var_maps;
 
 
Index: gcc/tree-ssa-loop-prefetch.c
===================================================================
--- gcc/tree-ssa-loop-prefetch.c	(revision 161805)
+++ gcc/tree-ssa-loop-prefetch.c	(working copy)
@@ -34,10 +34,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-config.h"
 #include "recog.h"
 #include "hashtab.h"
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "params.h"
 #include "langhooks.h"
 #include "tree-inline.h"
 #include "tree-data-ref.h"
Index: gcc/rtl.c
===================================================================
--- gcc/rtl.c	(revision 161805)
+++ gcc/rtl.c	(working copy)
@@ -32,11 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "rtl.h"
 #include "ggc.h"
 #ifdef GENERATOR_FILE
 # include "errors.h"
 #else
-# include "toplev.h"
+# include "diagnostic-core.h"
 #endif
 
 \f
 /* Indexed by rtx code, gives number of operands for an rtx with that code.
    Does NOT include rtx header data (code and links).  */
Index: gcc/ira-costs.c
===================================================================
--- gcc/ira-costs.c	(revision 161805)
+++ gcc/ira-costs.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "regs.h"
 #include "addresses.h"
 #include "insn-config.h"
 #include "recog.h"
 #include "reload.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "target.h"
 #include "params.h"
 #include "ira-int.h"
 
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	(revision 161805)
+++ gcc/tree-vect-stmts.c	(working copy)
@@ -35,10 +35,11 @@ along with GCC; see the file COPYING3.  
 #include "cfgloop.h"
 #include "cfglayout.h"
 #include "expr.h"
 #include "recog.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-vectorizer.h"
 #include "langhooks.h"
 
 
Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c	(revision 161805)
+++ gcc/tree-inline.c	(working copy)
@@ -21,11 +21,12 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "toplev.h"
+#include "toplev.h" /* floor_log2 */
+#include "diagnostic-core.h"
 #include "tree.h"
 #include "tree-inline.h"
 #include "flags.h"
 #include "params.h"
 #include "input.h"
Index: gcc/integrate.c
===================================================================
--- gcc/integrate.c	(revision 161805)
+++ gcc/integrate.c	(working copy)
@@ -36,10 +36,11 @@ along with GCC; see the file COPYING3.  
 #include "output.h"
 #include "recog.h"
 #include "integrate.h"
 #include "except.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "intl.h"
 #include "params.h"
 #include "ggc.h"
 #include "target.h"
Index: gcc/tree-optimize.c
===================================================================
--- gcc/tree-optimize.c	(revision 161805)
+++ gcc/tree-optimize.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-flow.h"
 #include "tree-dump.h"
 #include "timevar.h"
 #include "function.h"
 #include "langhooks.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "flags.h"
 #include "cgraph.h"
 #include "tree-inline.h"
 #include "tree-mudflap.h"
Index: gcc/fixed-value.c
===================================================================
--- gcc/fixed-value.c	(revision 161805)
+++ gcc/fixed-value.c	(working copy)
@@ -20,10 +20,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 /* Compare two fixed objects for bitwise identity.  */
 
 bool
Index: gcc/tree-object-size.c
===================================================================
--- gcc/tree-object-size.c	(revision 161805)
+++ gcc/tree-object-size.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
Index: gcc/combine.c
===================================================================
--- gcc/combine.c	(revision 161805)
+++ gcc/combine.c	(working copy)
@@ -90,10 +90,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 /* Include expr.h after insn-config.h so we get HAVE_conditional_move.  */
 #include "expr.h"
 #include "insn-attr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "target.h"
 #include "optabs.h"
 #include "insn-codes.h"
 #include "rtlhooks-def.h"
Index: gcc/tree-outof-ssa.c
===================================================================
--- gcc/tree-outof-ssa.c	(revision 161805)
+++ gcc/tree-outof-ssa.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "tree-flow.h"
 #include "timevar.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
 #include "toplev.h"
+#include "diagnostic-core.h"
 #include "ssaexpand.h"
 
 /* FIXME: A lot of code here deals with expanding to RTL.  All that code
    should be in cfgexpand.c.  */
 #include "expr.h"
Index: gcc/bb-reorder.c
===================================================================
--- gcc/bb-reorder.c	(revision 161805)
+++ gcc/bb-reorder.c	(working copy)
@@ -80,11 +80,12 @@
 #include "function.h"
 #include "tm_p.h"
 #include "obstack.h"
 #include "expr.h"
 #include "params.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
+#include "toplev.h" /* user_defined_section_attribute */
 #include "tree-pass.h"
 #include "df.h"
 
 /* The number of rounds.  In most cases there will only be 4 rounds, but
    when partitioning hot and cold basic blocks into separate sections of
Index: gcc/resource.c
===================================================================
--- gcc/resource.c	(revision 161805)
+++ gcc/resource.c	(working copy)
@@ -20,10 +20,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "function.h"
Index: gcc/cfgloop.c
===================================================================
--- gcc/cfgloop.c	(revision 161805)
+++ gcc/cfgloop.c	(working copy)
@@ -25,12 +25,12 @@ along with GCC; see the file COPYING3.  
 #include "rtl.h"
 #include "hard-reg-set.h"
 #include "obstack.h"
 #include "function.h"
 #include "basic-block.h"
-#include "toplev.h"
 #include "cfgloop.h"
+#include "diagnostic-core.h"
 #include "flags.h"
 #include "tree.h"
 #include "tree-flow.h"
 #include "pointer-set.h"
 #include "output.h"
Index: gcc/tree-profile.c
===================================================================
--- gcc/tree-profile.c	(revision 161805)
+++ gcc/tree-profile.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "tm.h"
 #include "flags.h"
 #include "regs.h"
 #include "function.h"
 #include "basic-block.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "coverage.h"
 #include "tree.h"
 #include "tree-flow.h"
 #include "tree-dump.h"
Index: gcc/plugin.c
===================================================================
--- gcc/plugin.c	(revision 161805)
+++ gcc/plugin.c	(working copy)
@@ -30,10 +30,11 @@ along with GCC; see the file COPYING3.  
 #ifdef ENABLE_PLUGIN
 #include <dlfcn.h>
 #endif
 
 #include "coretypes.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
 #include "plugin.h"
Index: gcc/main.c
===================================================================
--- gcc/main.c	(revision 161805)
+++ gcc/main.c	(working copy)
@@ -19,10 +19,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 int main (int argc, char **argv);
 
 /* We define main() to call toplev_main(), which is defined in toplev.c.
Index: gcc/reginfo.c
===================================================================
--- gcc/reginfo.c	(revision 161805)
+++ gcc/reginfo.c	(working copy)
@@ -42,10 +42,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "insn-config.h"
 #include "recog.h"
 #include "reload.h"
 #include "toplev.h"
+#include "diagnostic-core.h"
 #include "output.h"
 #include "ggc.h"
 #include "timevar.h"
 #include "hashtab.h"
 #include "target.h"
Index: gcc/sched-rgn.c
===================================================================
--- gcc/sched-rgn.c	(revision 161805)
+++ gcc/sched-rgn.c	(working copy)
@@ -47,10 +47,11 @@ along with GCC; see the file COPYING3.  
 \f
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "hard-reg-set.h"
 #include "regs.h"
Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c	(revision 161805)
+++ gcc/tree-ssa-structalias.c	(working copy)
@@ -30,10 +30,11 @@
 #include "basic-block.h"
 #include "output.h"
 #include "tree.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "gimple.h"
 #include "hashtab.h"
 #include "function.h"
 #include "cgraph.h"
Index: gcc/lto-opts.c
===================================================================
--- gcc/lto-opts.c	(revision 161805)
+++ gcc/lto-opts.c	(working copy)
@@ -29,10 +29,11 @@ along with GCC; see the file COPYING3.  
 #include "bitmap.h"
 #include "flags.h"
 #include "opts.h"
 #include "options.h"
 #include "target.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "lto-streamer.h"
 
 /* When a file is initially compiled, the options used when generating
    the IL are not necessarily the same as those used when linking the
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c	(revision 161805)
+++ gcc/tree-cfg.c	(working copy)
@@ -35,10 +35,11 @@ along with GCC; see the file COPYING3.  
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "timevar.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "except.h"
 #include "cfgloop.h"
 #include "cfglayout.h"
 #include "tree-ssa-propagate.h"
Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 161805)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -39,10 +39,11 @@ along with GCC; see the file COPYING3.  
 #include "optabs.h"
 #include "reload.h"
 #include "obstack.h"
 #include "except.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "integrate.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/frv/frv.c
===================================================================
--- gcc/config/frv/frv.c	(revision 161805)
+++ gcc/config/frv/frv.c	(working copy)
@@ -37,10 +37,11 @@ along with GCC; see the file COPYING3.  
 #include "expr.h"
 #include "obstack.h"
 #include "except.h"
 #include "function.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "tm_p.h"
 #include "ggc.h"
 #include <ctype.h>
Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c	(revision 161805)
+++ gcc/config/s390/s390.c	(working copy)
@@ -38,10 +38,11 @@ along with GCC; see the file COPYING3.  
 #include "except.h"
 #include "function.h"
 #include "recog.h"
 #include "expr.h"
 #include "reload.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "integrate.h"
 #include "ggc.h"
 #include "target.h"
Index: gcc/config/m32c/m32c.c
===================================================================
--- gcc/config/m32c/m32c.c	(revision 161805)
+++ gcc/config/m32c/m32c.c	(working copy)
@@ -32,10 +32,11 @@
 #include "output.h"
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
 #include "reload.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "obstack.h"
 #include "tree.h"
 #include "expr.h"
 #include "optabs.h"
Index: gcc/config/m32c/m32c-pragma.c
===================================================================
--- gcc/config/m32c/m32c-pragma.c	(revision 161805)
+++ gcc/config/m32c/m32c-pragma.c	(working copy)
@@ -22,10 +22,11 @@
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "c-family/c-pragma.h"
 #include "cpplib.h"
 #include "hard-reg-set.h"
 #include "output.h"
Index: gcc/config/spu/spu.c
===================================================================
--- gcc/config/spu/spu.c	(revision 161805)
+++ gcc/config/spu/spu.c	(working copy)
@@ -33,10 +33,11 @@
 #include "except.h"
 #include "function.h"
 #include "output.h"
 #include "basic-block.h"
 #include "integrate.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/sparc/sparc.c
===================================================================
--- gcc/config/sparc/sparc.c	(revision 161805)
+++ gcc/config/sparc/sparc.c	(working copy)
@@ -39,10 +39,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "except.h"
 #include "expr.h"
 #include "optabs.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "tm_p.h"
 #include "debug.h"
 #include "target.h"
Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	(revision 161805)
+++ gcc/config/mep/mep.c	(working copy)
@@ -41,10 +41,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "optabs.h"
 #include "reload.h"
 #include "tm_p.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "integrate.h"
 #include "target.h"
 #include "target-def.h"
 #include "langhooks.h"
Index: gcc/config/mep/mep-pragma.c
===================================================================
--- gcc/config/mep/mep-pragma.c	(revision 161805)
+++ gcc/config/mep/mep-pragma.c	(working copy)
@@ -23,10 +23,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "c-family/c-pragma.h"
 #include "cpplib.h"
 #include "hard-reg-set.h"
 #include "output.h"
Index: gcc/config/m32r/m32r.c
===================================================================
--- gcc/config/m32r/m32r.c	(revision 161805)
+++ gcc/config/m32r/m32r.c	(working copy)
@@ -32,10 +32,11 @@
 #include "insn-attr.h"
 #include "flags.h"
 #include "expr.h"
 #include "function.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "integrate.h"
 #include "df.h"
 #include "tm_p.h"
Index: gcc/config/darwin-c.c
===================================================================
--- gcc/config/darwin-c.c	(revision 161805)
+++ gcc/config/darwin-c.c	(working copy)
@@ -26,10 +26,11 @@ along with GCC; see the file COPYING3.  
 #include "cpplib.h"
 #include "tree.h"
 #include "incpath.h"
 #include "c-family/c-common.h"
 #include "c-family/c-pragma.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "flags.h"
 #include "tm_p.h"
 #include "cppdefault.h"
 #include "prefix.h"
Index: gcc/config/i386/winnt-stubs.c
===================================================================
--- gcc/config/i386/winnt-stubs.c	(revision 161805)
+++ gcc/config/i386/winnt-stubs.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "hard-reg-set.h"
 #include "output.h"
 #include "tree.h"
 #include "flags.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "hashtab.h"
 
 bool
 i386_pe_type_dllimport_p (tree decl ATTRIBUTE_UNUSED)
Index: gcc/config/i386/netware.c
===================================================================
--- gcc/config/i386/netware.c	(revision 161805)
+++ gcc/config/i386/netware.c	(working copy)
@@ -27,10 +27,11 @@ along with GCC; see the file COPYING3.  
 #include "hard-reg-set.h"
 #include "output.h"
 #include "tree.h"
 #include "flags.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "langhooks.h"
 #include "ggc.h"
 
 /* Return string which is the function name, identified by ID, modified
Index: gcc/config/i386/winnt.c
===================================================================
--- gcc/config/i386/winnt.c	(revision 161805)
+++ gcc/config/i386/winnt.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "hard-reg-set.h"
 #include "output.h"
 #include "tree.h"
 #include "flags.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "hashtab.h"
 #include "langhooks.h"
 #include "ggc.h"
 #include "target.h"
Index: gcc/config/i386/nwld.c
===================================================================
--- gcc/config/i386/nwld.c	(revision 161805)
+++ gcc/config/i386/nwld.c	(working copy)
@@ -27,10 +27,11 @@ along with GCC; see the file COPYING3.  
 #include "hard-reg-set.h"
 #include "output.h"
 #include "tree.h"
 #include "flags.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 void
 nwld_named_section_asm_out_constructor (rtx symbol, int priority)
 {
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 161805)
+++ gcc/config/i386/i386.c	(working copy)
@@ -37,10 +37,11 @@ along with GCC; see the file COPYING3.  
 #include "except.h"
 #include "function.h"
 #include "recog.h"
 #include "expr.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "ggc.h"
 #include "target.h"
 #include "target-def.h"
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c	(revision 161805)
+++ gcc/config/rx/rx.c	(working copy)
@@ -38,10 +38,11 @@
 #include "function.h"
 #include "expr.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "reload.h"
 #include "df.h"
 #include "ggc.h"
 #include "tm_p.h"
Index: gcc/config/sol2.c
===================================================================
--- gcc/config/sol2.c	(revision 161805)
+++ gcc/config/sol2.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 #include "tree.h"
 #include "output.h"
 #include "tm.h"
 #include "rtl.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 
 tree solaris_pending_aligns, solaris_pending_inits, solaris_pending_finis;
 
Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	(revision 161805)
+++ gcc/config/sh/sh.c	(working copy)
@@ -35,10 +35,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "output.h"
 #include "insn-attr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "integrate.h"
 #include "dwarf2.h"
 #include "tm_p.h"
Index: gcc/config/sh/symbian-base.c
===================================================================
--- gcc/config/sh/symbian-base.c	(revision 161805)
+++ gcc/config/sh/symbian-base.c	(working copy)
@@ -28,10 +28,11 @@
 #include "output.h"
 #include "flags.h"
 #include "tree.h"
 #include "expr.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "sh-symbian.h"
 
 /* Return nonzero if SYMBOL is marked as being dllexport'd.  */
 
Index: gcc/config/sh/symbian-c.c
===================================================================
--- gcc/config/sh/symbian-c.c	(revision 161805)
+++ gcc/config/sh/symbian-c.c	(working copy)
@@ -27,10 +27,11 @@
 #include "output.h"
 #include "flags.h"
 #include "tree.h"
 #include "expr.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "sh-symbian.h"
 
 \f
 /* Return the type that we should use to determine if DECL is
Index: gcc/config/pdp11/pdp11.c
===================================================================
--- gcc/config/pdp11/pdp11.c	(revision 161805)
+++ gcc/config/pdp11/pdp11.c	(working copy)
@@ -33,10 +33,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
 #include "tree.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
 #include "df.h"
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	(revision 161805)
+++ gcc/config/avr/avr.c	(working copy)
@@ -32,10 +32,11 @@
 #include "flags.h"
 #include "reload.h"
 #include "tree.h"
 #include "output.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "obstack.h"
 #include "function.h"
 #include "recog.h"
 #include "ggc.h"
Index: gcc/config/crx/crx.c
===================================================================
--- gcc/config/crx/crx.c	(revision 161805)
+++ gcc/config/crx/crx.c	(working copy)
@@ -41,10 +41,11 @@
 #include "except.h"
 #include "function.h"
 #include "recog.h"
 #include "expr.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "df.h"
 #include "target.h"
 #include "target-def.h"
Index: gcc/config/xtensa/xtensa.c
===================================================================
--- gcc/config/xtensa/xtensa.c	(revision 161805)
+++ gcc/config/xtensa/xtensa.c	(working copy)
@@ -38,10 +38,11 @@ along with GCC; see the file COPYING3.  
 #include "expr.h"
 #include "flags.h"
 #include "reload.h"
 #include "tm_p.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "ggc.h"
 #include "target.h"
Index: gcc/config/stormy16/stormy16.c
===================================================================
--- gcc/config/stormy16/stormy16.c	(revision 161805)
+++ gcc/config/stormy16/stormy16.c	(working copy)
@@ -31,10 +31,11 @@
 #include "insn-flags.h"
 #include "output.h"
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "obstack.h"
 #include "tree.h"
 #include "expr.h"
 #include "optabs.h"
Index: gcc/config/fr30/fr30.c
===================================================================
--- gcc/config/fr30/fr30.c	(revision 161805)
+++ gcc/config/fr30/fr30.c	(working copy)
@@ -37,10 +37,11 @@
 #include "output.h"
 #include "expr.h"
 #include "obstack.h"
 #include "except.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
 
Index: gcc/config/lm32/lm32.c
===================================================================
--- gcc/config/lm32/lm32.c	(revision 161805)
+++ gcc/config/lm32/lm32.c	(working copy)
@@ -38,10 +38,11 @@
 #include "expr.h"
 #include "flags.h"
 #include "reload.h"
 #include "tm_p.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "ggc.h"
 #include "target.h"
Index: gcc/config/sol2-c.c
===================================================================
--- gcc/config/sol2-c.c	(revision 161805)
+++ gcc/config/sol2-c.c	(working copy)
@@ -22,10 +22,11 @@ along with GCC; see the file COPYING3.  
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "tm.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 
 #include "c-family/c-format.h"
 #include "intl.h"
 
Index: gcc/config/moxie/moxie.c
===================================================================
--- gcc/config/moxie/moxie.c	(revision 161805)
+++ gcc/config/moxie/moxie.c	(working copy)
@@ -31,10 +31,11 @@
 #include "output.h"
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
 #include "reload.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "obstack.h"
 #include "tree.h"
 #include "expr.h"
 #include "optabs.h"
Index: gcc/config/m68hc11/m68hc11.c
===================================================================
--- gcc/config/m68hc11/m68hc11.c	(revision 161805)
+++ gcc/config/m68hc11/m68hc11.c	(working copy)
@@ -49,10 +49,11 @@ Note:
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
 #include "libfuncs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "function.h"
 #include "ggc.h"
 #include "reload.h"
Index: gcc/config/cris/cris.c
===================================================================
--- gcc/config/cris/cris.c	(revision 161805)
+++ gcc/config/cris/cris.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "tree.h"
 #include "expr.h"
 #include "except.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "reload.h"
 #include "tm_p.h"
 #include "debug.h"
Index: gcc/config/iq2000/iq2000.c
===================================================================
--- gcc/config/iq2000/iq2000.c	(revision 161805)
+++ gcc/config/iq2000/iq2000.c	(working copy)
@@ -35,10 +35,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "expr.h"
 #include "optabs.h"
 #include "libfuncs.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "reload.h"
 #include "ggc.h"
 #include "tm_p.h"
 #include "debug.h"
Index: gcc/config/host-darwin.c
===================================================================
--- gcc/config/host-darwin.c	(revision 161805)
+++ gcc/config/host-darwin.c	(working copy)
@@ -19,10 +19,11 @@
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include <sys/mman.h>
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "config/host-darwin.h"
 
 /* Yes, this is really supposed to work.  */
 static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c	(revision 161805)
+++ gcc/config/mn10300/mn10300.c	(working copy)
@@ -36,10 +36,11 @@ along with GCC; see the file COPYING3.  
 #include "reload.h"
 #include "expr.h"
 #include "optabs.h"
 #include "function.h"
 #include "obstack.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
 
Index: gcc/config/ia64/ia64.c
===================================================================
--- gcc/config/ia64/ia64.c	(revision 161805)
+++ gcc/config/ia64/ia64.c	(working copy)
@@ -40,10 +40,11 @@ along with GCC; see the file COPYING3.  
 #include "except.h"
 #include "function.h"
 #include "ggc.h"
 #include "basic-block.h"
 #include "libfuncs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "sched-int.h"
 #include "timevar.h"
 #include "target.h"
 #include "target-def.h"
Index: gcc/config/m68k/m68k.c
===================================================================
--- gcc/config/m68k/m68k.c	(revision 161805)
+++ gcc/config/m68k/m68k.c	(working copy)
@@ -31,10 +31,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-config.h"
 #include "conditions.h"
 #include "output.h"
 #include "insn-attr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "expr.h"
 #include "reload.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 161805)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -39,10 +39,11 @@
 #include "except.h"
 #include "function.h"
 #include "output.h"
 #include "basic-block.h"
 #include "integrate.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/picochip/picochip.c
===================================================================
--- gcc/config/picochip/picochip.c	(revision 161805)
+++ gcc/config/picochip/picochip.c	(working copy)
@@ -39,10 +39,11 @@ along with GCC; see the file COPYING3.  
 #include "except.h"
 #include "function.h"
 #include "output.h"
 #include "basic-block.h"
 #include "integrate.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "hashtab.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c	(revision 161805)
+++ gcc/config/darwin.c	(working copy)
@@ -39,10 +39,11 @@ along with GCC; see the file COPYING3.  
 #include "function.h"
 #include "ggc.h"
 #include "langhooks.h"
 #include "target.h"
 #include "tm_p.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "hashtab.h"
 #include "df.h"
 #include "debug.h"
 #include "obstack.h"
Index: gcc/config/arc/arc.c
===================================================================
--- gcc/config/arc/arc.c	(revision 161805)
+++ gcc/config/arc/arc.c	(working copy)
@@ -34,10 +34,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-attr.h"
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "df.h"
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
Index: gcc/config/mcore/mcore.c
===================================================================
--- gcc/config/mcore/mcore.c	(revision 161805)
+++ gcc/config/mcore/mcore.c	(working copy)
@@ -38,10 +38,11 @@
 #include "expr.h"
 #include "reload.h"
 #include "recog.h"
 #include "function.h"
 #include "ggc.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "target.h"
 #include "target-def.h"
 #include "df.h"
 
Index: gcc/config/score/score3.c
===================================================================
--- gcc/config/score/score3.c	(revision 161805)
+++ gcc/config/score/score3.c	(working copy)
@@ -27,10 +27,11 @@
 #include "hard-reg-set.h"
 #include "insn-config.h"
 #include "conditions.h"
 #include "insn-attr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "tree.h"
 #include "function.h"
 #include "expr.h"
Index: gcc/config/score/score7.c
===================================================================
--- gcc/config/score/score7.c	(revision 161805)
+++ gcc/config/score/score7.c	(working copy)
@@ -27,10 +27,11 @@
 #include "hard-reg-set.h"
 #include "insn-config.h"
 #include "conditions.h"
 #include "insn-attr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "tree.h"
 #include "function.h"
 #include "expr.h"
Index: gcc/config/score/score.c
===================================================================
--- gcc/config/score/score.c	(revision 161805)
+++ gcc/config/score/score.c	(working copy)
@@ -27,10 +27,11 @@
 #include "hard-reg-set.h"
 #include "insn-config.h"
 #include "conditions.h"
 #include "insn-attr.h"
 #include "recog.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "tree.h"
 #include "function.h"
 #include "expr.h"
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 161805)
+++ gcc/config/arm/arm.c	(working copy)
@@ -38,10 +38,11 @@
 #include "flags.h"
 #include "reload.h"
 #include "function.h"
 #include "expr.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "cgraph.h"
 #include "ggc.h"
 #include "except.h"
Index: gcc/config/arm/pe.c
===================================================================
--- gcc/config/arm/pe.c	(revision 161805)
+++ gcc/config/arm/pe.c	(working copy)
@@ -26,10 +26,11 @@
 #include "rtl.h"
 #include "output.h"
 #include "flags.h"
 #include "tree.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm_p.h"
 
 extern int current_function_anonymous_args;
 
Index: gcc/config/pa/pa.c
===================================================================
--- gcc/config/pa/pa.c	(revision 161805)
+++ gcc/config/pa/pa.c	(working copy)
@@ -37,10 +37,11 @@ along with GCC; see the file COPYING3.  
 #include "expr.h"
 #include "optabs.h"
 #include "reload.h"
 #include "integrate.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "recog.h"
 #include "predict.h"
 #include "tm_p.h"
Index: gcc/config/vax/vax.c
===================================================================
--- gcc/config/vax/vax.c	(revision 161805)
+++ gcc/config/vax/vax.c	(working copy)
@@ -36,10 +36,11 @@ along with GCC; see the file COPYING3.  
 #include "recog.h"
 #include "expr.h"
 #include "optabs.h"
 #include "flags.h"
 #include "debug.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "tm-preds.h"
 #include "tm-constrs.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/v850/v850-c.c
===================================================================
--- gcc/config/v850/v850-c.c	(revision 161805)
+++ gcc/config/v850/v850-c.c	(working copy)
@@ -24,10 +24,11 @@ along with GCC; see the file COPYING3.  
 #include "coretypes.h"
 #include "tm.h"
 #include "cpplib.h"
 #include "tree.h"
 #include "c-family/c-pragma.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "tm_p.h"
 
 #ifndef streq
Index: gcc/config/v850/v850.c
===================================================================
--- gcc/config/v850/v850.c	(revision 161805)
+++ gcc/config/v850/v850.c	(working copy)
@@ -33,10 +33,11 @@
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
 #include "function.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "integrate.h"
 #include "tm_p.h"
 #include "target.h"
Index: gcc/config/h8300/h8300.c
===================================================================
--- gcc/config/h8300/h8300.c	(revision 161805)
+++ gcc/config/h8300/h8300.c	(working copy)
@@ -36,10 +36,11 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
 #include "function.h"
 #include "optabs.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "c-family/c-pragma.h"	/* ??? */
 #include "tm_p.h"
 #include "ggc.h"
 #include "target.h"
Index: gcc/config/vxworks.c
===================================================================
--- gcc/config/vxworks.c	(revision 161805)
+++ gcc/config/vxworks.c	(working copy)
@@ -21,10 +21,11 @@ along with GCC; see the file COPYING3.  
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "target.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "tm.h"
 #include "tree.h"
 
Index: gcc/config/mmix/mmix.c
===================================================================
--- gcc/config/mmix/mmix.c	(revision 161805)
+++ gcc/config/mmix/mmix.c	(working copy)
@@ -32,10 +32,11 @@ along with GCC; see the file COPYING3.  
 #include "output.h"
 #include "flags.h"
 #include "tree.h"
 #include "function.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "ggc.h"
 #include "dwarf2.h"
 #include "debug.h"
Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c	(revision 161805)
+++ gcc/config/bfin/bfin.c	(working copy)
@@ -38,10 +38,11 @@
 #include "function.h"
 #include "input.h"
 #include "target.h"
 #include "target-def.h"
 #include "expr.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "recog.h"
 #include "optabs.h"
 #include "ggc.h"
 #include "integrate.h"
Index: gcc/stmt.c
===================================================================
--- gcc/stmt.c	(revision 161805)
+++ gcc/stmt.c	(working copy)
@@ -39,10 +39,11 @@ along with GCC; see the file COPYING3.  
 #include "insn-config.h"
 #include "expr.h"
 #include "libfuncs.h"
 #include "recog.h"
 #include "machmode.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "output.h"
 #include "ggc.h"
 #include "langhooks.h"
 #include "predict.h"
Index: gcc/convert.c
===================================================================
--- gcc/convert.c	(revision 161805)
+++ gcc/convert.c	(working copy)
@@ -28,10 +28,11 @@ along with GCC; see the file COPYING3.  
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
 #include "convert.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "langhooks.h"
 
 /* Convert EXPR to some pointer or reference type TYPE.
    EXPR must be pointer, reference, integer, enumeral, or literal zero;
Index: gcc/regcprop.c
===================================================================
--- gcc/regcprop.c	(revision 161805)
+++ gcc/regcprop.c	(working copy)
@@ -33,10 +33,11 @@
 #include "output.h"
 #include "function.h"
 #include "recog.h"
 #include "flags.h"
 #include "toplev.h"
+#include "diagnostic-core.h"
 #include "obstack.h"
 #include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-06  5:50 do not include diagnostic-core.h in toplev.h Manuel López-Ibáñez
@ 2010-07-06 14:31 ` Tobias Burnus
  2010-07-06 14:44   ` Manuel López-Ibáñez
  2010-07-07 19:16 ` Tom Tromey
  2010-07-07 19:25 ` Diego Novillo
  2 siblings, 1 reply; 18+ messages in thread
From: Tobias Burnus @ 2010-07-06 14:31 UTC (permalink / raw)
  To: Manuel López-Ibáñez, gfortran
  Cc: Gcc Patch List, Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

Manuel López-Ibáñez wrote:
> This patch moves diagnostic-core.h out of toplev.h. Since toplev.h is
> included everywhere, it would be an enormous work to check every file
> to ensure which one is actually needed. Followup patches can
> progressively remove either toplev.h or diagnostic-core.h (or
> sometimes even both). Therefore, my patch just includes
> diagnostic-core.h whenever toplev.h is included, except in a few
> places where I removed the unused includes by hand before giving up.
> In particular, the C/C++ frontends did not need to include additional
> headers because diagnostic-core.h is included by c-common.h, c-tree.h
> and cp-tree.h (Not sure whether this is correct but it was like this
> before my patch).
> 
> Bootstrapped and regression tested on x86_64-linux-gnu.

> fortran/
> 	* Include diagnostic-core.h in every file that includes toplev.h.

The changelog is incomplete.

Attached is a patch which selectively includes one file or the other
(well, as it turns out: both). The patch was trivial as comments
indicated which function are required.

I think even without Manuel's patch it is profitable as many files only
need "diagnostic-core.h" even though they include "toplev.h". Thus, I
intent the commit the attached patch as obvious - unless there are
objections.

Build and being regtested on x86-64-linux.
(The build is with Manuel's patch.)

Tobias

[-- Attachment #2: diag-include.diff --]
[-- Type: text/x-patch, Size: 5791 bytes --]

2010-07-06  Tobias Burnus  <burnus@net-b.de>

	* trans-decl.c: Include diagnostic-core.h besides toplev.h.
	* trans-intrinsic.c: Ditto.
	* trans-types.c: Ditto.
	* convert.c: Include diagnostic-core.h instead of toplev.h.
	* options.c: Ditto.
	* trans-array.c: Ditto.
	* trans-const.c: Ditto.
	* trans-expr.c: Ditto.
	* trans-io.c: Ditto.
	* trans-openmp.c: Ditto.
	* trans.c: Ditto.

diff --git a/gcc/fortran/convert.c b/gcc/fortran/convert.c
index f69ea23..50e3a6a 100644
--- a/gcc/fortran/convert.c
+++ b/gcc/fortran/convert.c
@@ -40,7 +40,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "flags.h"
 #include "convert.h"
-#include "toplev.h"	/* For error.  */
+#include "diagnostic-core.h"	/* For error.  */
 #include "gfortran.h"
 #include "trans.h"
 
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index af537a1..d5c6c3c 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gfortran.h"
 #include "target.h"
 #include "cpp.h"
-#include "toplev.h"	/* For sorry.  */
+#include "diagnostic-core.h"	/* For sorry.  */
 #include "tm.h"
 
 gfc_option_t gfc_option;
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 7eb8e75..bc26835 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -80,7 +80,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "toplev.h"	/* For internal_error/fatal_error.  */
+#include "diagnostic-core.h"	/* For internal_error/fatal_error.  */
 #include "flags.h"
 #include "gfortran.h"
 #include "constructor.h"
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 6d4f222..8cd4fda 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "realmpfr.h"
-#include "toplev.h"	/* For fatal_error.  */
+#include "diagnostic-core.h"	/* For fatal_error.  */
 #include "double-int.h"
 #include "gfortran.h"
 #include "trans.h"
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 1c7226c..1331148 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -29,7 +29,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-dump.h"
 #include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "ggc.h"
-#include "toplev.h"	/* For announce_function/internal_error.  */
+#include "diagnostic-core.h"	/* For internal_error.  */
+#include "toplev.h"	/* For announce_function.  */
 #include "output.h"	/* For decl_default_tls_model.  */
 #include "target.h"
 #include "function.h"
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 1a7a4a1..ea8b892 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "toplev.h"	/* For fatal_error.  */
+#include "diagnostic-core.h"	/* For fatal_error.  */
 #include "langhooks.h"
 #include "flags.h"
 #include "gfortran.h"
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 7f583da..0b737b0 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -28,7 +28,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"		/* For UNITS_PER_WORD.  */
 #include "tree.h"
 #include "ggc.h"
-#include "toplev.h"	/* For rest_of_decl_compilation/internal_error.  */
+#include "diagnostic-core.h"	/* For internal_error.  */
+#include "toplev.h"	/* For rest_of_decl_compilation.  */
 #include "flags.h"
 #include "gfortran.h"
 #include "arith.h"
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 9926d2f..2624bb2 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "ggc.h"
-#include "toplev.h"	/* For internal_error.  */
+#include "diagnostic-core.h"	/* For internal_error.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-stmt.h"
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 7a7d330..4a7f70e 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "gimple.h"	/* For create_tmp_var_raw.  */
-#include "toplev.h"	/* For internal_error.  */
+#include "diagnostic-core.h"	/* For internal_error.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-stmt.h"
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 6f71da8..cfc6ab6 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -30,7 +30,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"	/* For iso-c-bindings.def.  */
 #include "target.h"
 #include "ggc.h"
-#include "toplev.h"	/* For rest_of_decl_compilation/fatal_error.  */
+#include "diagnostic-core.h"  /* For fatal_error.  */
+#include "toplev.h"	/* For rest_of_decl_compilation.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-types.h"
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 43b69d5..f97e739 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "tree-iterator.h"
-#include "toplev.h"	/* For internal_error.  */
+#include "diagnostic-core.h"  /* For internal_error.  */
 #include "defaults.h"
 #include "flags.h"
 #include "gfortran.h"

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-06 14:31 ` Tobias Burnus
@ 2010-07-06 14:44   ` Manuel López-Ibáñez
  0 siblings, 0 replies; 18+ messages in thread
From: Manuel López-Ibáñez @ 2010-07-06 14:44 UTC (permalink / raw)
  To: Tobias Burnus
  Cc: gfortran, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor

On 6 July 2010 16:30, Tobias Burnus <burnus@net-b.de> wrote:
>
> I think even without Manuel's patch it is profitable as many files only
> need "diagnostic-core.h" even though they include "toplev.h". Thus, I
> intent the commit the attached patch as obvious - unless there are
> objections.

Thanks, I will update my patch once yours is committed.


Manuel.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-06  5:50 do not include diagnostic-core.h in toplev.h Manuel López-Ibáñez
  2010-07-06 14:31 ` Tobias Burnus
@ 2010-07-07 19:16 ` Tom Tromey
  2010-07-07 19:25 ` Diego Novillo
  2 siblings, 0 replies; 18+ messages in thread
From: Tom Tromey @ 2010-07-07 19:16 UTC (permalink / raw)
  To: Manuel López-Ibáñez
  Cc: Gcc Patch List, Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

>>>>> "Manuel" == Manuel López-Ibáñez <lopezibanez@gmail.com> writes:

Manuel> java/
Manuel> 	* Include diagnostic-core.h in every file that includes toplev.h.

The java parts are ok -- though really I think if the primary change is
approved the rest is obvious.

Tom

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-06  5:50 do not include diagnostic-core.h in toplev.h Manuel López-Ibáñez
  2010-07-06 14:31 ` Tobias Burnus
  2010-07-07 19:16 ` Tom Tromey
@ 2010-07-07 19:25 ` Diego Novillo
  2010-07-07 19:39   ` Manuel López-Ibáñez
  2010-07-08  4:24   ` Manuel López-Ibáñez
  2 siblings, 2 replies; 18+ messages in thread
From: Diego Novillo @ 2010-07-07 19:25 UTC (permalink / raw)
  To: Manuel López-Ibáñez
  Cc: Gcc Patch List, Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:

> 2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>
>        * toplev.h: Do not include diagnostic-core.h.
>        Include diagnostic-core.h in every file that includes toplev.h.
>        * c-tree.h: Do not include toplev.h.
>
> c-family/
>        * c-common.h: Include diagnostic-core.h. Error if already
>        included.
>        * c-semantics.c: Do not define GCC_DIAG_STYLE here.
> cp/
>        * cp-tree.h: Do not include toplev.h.
>
> java/
>        * Include diagnostic-core.h in every file that includes toplev.h.
> ada/
>        * Include diagnostic-core.h in every file that includes toplev.h.
> fortran/
>        * Include diagnostic-core.h in every file that includes toplev.h.
> lto/
>        * Include diagnostic-core.h in every file that includes toplev.h.

OK, though the CL should mention the affected files.


Diego.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-07 19:25 ` Diego Novillo
@ 2010-07-07 19:39   ` Manuel López-Ibáñez
  2010-07-07 20:24     ` Tobias Burnus
  2010-07-08  4:24   ` Manuel López-Ibáñez
  1 sibling, 1 reply; 18+ messages in thread
From: Manuel López-Ibáñez @ 2010-07-07 19:39 UTC (permalink / raw)
  To: Diego Novillo
  Cc: Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor, Tobias Burnus

On 7 July 2010 21:25, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
>
>> 2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>>
>>        * toplev.h: Do not include diagnostic-core.h.
>>        Include diagnostic-core.h in every file that includes toplev.h.
>>        * c-tree.h: Do not include toplev.h.
>>
>> c-family/
>>        * c-common.h: Include diagnostic-core.h. Error if already
>>        included.
>>        * c-semantics.c: Do not define GCC_DIAG_STYLE here.
>> cp/
>>        * cp-tree.h: Do not include toplev.h.
>>
>> java/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>> ada/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>> fortran/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>> lto/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>
> OK, though the CL should mention the affected files.

Fine. I will wait for Tobias Burnus to commit his change.

Cheers,

Manuel.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-07 19:39   ` Manuel López-Ibáñez
@ 2010-07-07 20:24     ` Tobias Burnus
  0 siblings, 0 replies; 18+ messages in thread
From: Tobias Burnus @ 2010-07-07 20:24 UTC (permalink / raw)
  To: Manuel López-Ibáñez
  Cc: Diego Novillo, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor

Manuel López-Ibáñez wrote:
> Fine. I will wait for Tobias Burnus to commit his change.
>   

Missed to reply. The Fortran changes were already committed as Rev. 161885.

Tobias

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-07 19:25 ` Diego Novillo
  2010-07-07 19:39   ` Manuel López-Ibáñez
@ 2010-07-08  4:24   ` Manuel López-Ibáñez
  2010-07-08 11:30     ` Ramana Radhakrishnan
  1 sibling, 1 reply; 18+ messages in thread
From: Manuel López-Ibáñez @ 2010-07-08  4:24 UTC (permalink / raw)
  To: Diego Novillo
  Cc: Gcc Patch List, Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

On 7 July 2010 21:25, Diego Novillo <dnovillo@google.com> wrote:
> On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
>
>> 2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>>
>>        * toplev.h: Do not include diagnostic-core.h.
>>        Include diagnostic-core.h in every file that includes toplev.h.
>>        * c-tree.h: Do not include toplev.h.
>>
>> c-family/
>>        * c-common.h: Include diagnostic-core.h. Error if already
>>        included.
>>        * c-semantics.c: Do not define GCC_DIAG_STYLE here.
>> cp/
>>        * cp-tree.h: Do not include toplev.h.
>>
>> java/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>> ada/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>> fortran/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>> lto/
>>        * Include diagnostic-core.h in every file that includes toplev.h.
>
> OK, though the CL should mention the affected files.

Done. Committed as revision 161943.

Cheers,

Manuel.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08  4:24   ` Manuel López-Ibáñez
@ 2010-07-08 11:30     ` Ramana Radhakrishnan
  2010-07-08 12:09       ` Richard Guenther
  2010-07-08 14:02       ` Manuel López-Ibáñez
  0 siblings, 2 replies; 18+ messages in thread
From: Ramana Radhakrishnan @ 2010-07-08 11:30 UTC (permalink / raw)
  To: Manuel López-Ibáñez
  Cc: Diego Novillo, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor


On Thu, 2010-07-08 at 06:23 +0200, Manuel López-Ibáñez wrote:
> On 7 July 2010 21:25, Diego Novillo <dnovillo@google.com> wrote:
> > On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> >
> >> 2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
> >>
> >>        * toplev.h: Do not include diagnostic-core.h.
> >>        Include diagnostic-core.h in every file that includes toplev.h.
> >>        * c-tree.h: Do not include toplev.h.
> >>
> >> c-family/
> >>        * c-common.h: Include diagnostic-core.h. Error if already
> >>        included.
> >>        * c-semantics.c: Do not define GCC_DIAG_STYLE here.
> >> cp/
> >>        * cp-tree.h: Do not include toplev.h.
> >>
> >> java/
> >>        * Include diagnostic-core.h in every file that includes toplev.h.
> >> ada/
> >>        * Include diagnostic-core.h in every file that includes toplev.h.
> >> fortran/
> >>        * Include diagnostic-core.h in every file that includes toplev.h.
> >> lto/
> >>        * Include diagnostic-core.h in every file that includes toplev.h.
> >
> > OK, though the CL should mention the affected files.
> 
> Done. Committed as revision 161943.


Sorry - didn't notice this before but won't this break bootstrap on
every platform that uses error or any function in diagnostic-core.h in 
the backend machine description. 

For instance error is used in config/arm/neon.md to give errors in
certain circumstances, thus shouldn't generated programs that use
toplev.h also be corrected to include diagnostic-core.h in such cases.
Thus the generator programs have to be audited to check which ones need
to include diagnostic-core.h and which don't. 

/home/ramrad01/builds/build-161947/./prev-gcc/xgcc
-B/home/ramrad01/builds/build-161947/./prev-gcc/
-B/usr/local/armv7l-unknown-linux-gnueabi/bin/
-B/usr/local/armv7l-unknown-linux-gnueabi/bin/
-B/usr/local/armv7l-unknown-linux-gnueabi/lib/
-isystem /usr/local/armv7l-unknown-linux-gnueabi/include
-isystem /usr/local/armv7l-unknown-linux-gnueabi/sys-include    -c   -g
-O2 -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H
-I. -I. -I/home/ramrad01/sources/trunk/gcc
-I/home/ramrad01/sources/trunk/gcc/.
-I/home/ramrad01/sources/trunk/gcc/../include
-I/home/ramrad01/sources/trunk/gcc/../libcpp/include
-I/home/ramrad01/sources/trunk/gcc/../libdecnumber
-I/home/ramrad01/sources/trunk/gcc/../libdecnumber/dpd -I../libdecnumber
-DCLOOG_PPL_BACKEND  -I/usr/include/libelf  insn-output.c -o
insn-output.o
/home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
'output_1491':
/home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
implicit declaration of function
'error' [-Werror=implicit-function-declaration]


cheers
Ramana


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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 11:30     ` Ramana Radhakrishnan
@ 2010-07-08 12:09       ` Richard Guenther
  2010-07-08 13:34         ` Richard Earnshaw
  2010-07-08 13:36         ` Ramana Radhakrishnan
  2010-07-08 14:02       ` Manuel López-Ibáñez
  1 sibling, 2 replies; 18+ messages in thread
From: Richard Guenther @ 2010-07-08 12:09 UTC (permalink / raw)
  To: ramana.radhakrishnan
  Cc: Manuel López-Ibáñez, Diego Novillo,
	Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor

On Thu, Jul 8, 2010 at 1:30 PM, Ramana Radhakrishnan
<ramana.radhakrishnan@arm.com> wrote:
>
> On Thu, 2010-07-08 at 06:23 +0200, Manuel López-Ibáñez wrote:
>> On 7 July 2010 21:25, Diego Novillo <dnovillo@google.com> wrote:
>> > On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
>> >
>> >> 2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>> >>
>> >>        * toplev.h: Do not include diagnostic-core.h.
>> >>        Include diagnostic-core.h in every file that includes toplev.h.
>> >>        * c-tree.h: Do not include toplev.h.
>> >>
>> >> c-family/
>> >>        * c-common.h: Include diagnostic-core.h. Error if already
>> >>        included.
>> >>        * c-semantics.c: Do not define GCC_DIAG_STYLE here.
>> >> cp/
>> >>        * cp-tree.h: Do not include toplev.h.
>> >>
>> >> java/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >> ada/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >> fortran/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >> lto/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >
>> > OK, though the CL should mention the affected files.
>>
>> Done. Committed as revision 161943.
>
>
> Sorry - didn't notice this before but won't this break bootstrap on
> every platform that uses error or any function in diagnostic-core.h in
> the backend machine description.
>
> For instance error is used in config/arm/neon.md to give errors in
> certain circumstances, thus shouldn't generated programs that use
> toplev.h also be corrected to include diagnostic-core.h in such cases.
> Thus the generator programs have to be audited to check which ones need
> to include diagnostic-core.h and which don't.
>
> /home/ramrad01/builds/build-161947/./prev-gcc/xgcc
> -B/home/ramrad01/builds/build-161947/./prev-gcc/
> -B/usr/local/armv7l-unknown-linux-gnueabi/bin/
> -B/usr/local/armv7l-unknown-linux-gnueabi/bin/
> -B/usr/local/armv7l-unknown-linux-gnueabi/lib/
> -isystem /usr/local/armv7l-unknown-linux-gnueabi/include
> -isystem /usr/local/armv7l-unknown-linux-gnueabi/sys-include    -c   -g
> -O2 -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
> -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H
> -I. -I. -I/home/ramrad01/sources/trunk/gcc
> -I/home/ramrad01/sources/trunk/gcc/.
> -I/home/ramrad01/sources/trunk/gcc/../include
> -I/home/ramrad01/sources/trunk/gcc/../libcpp/include
> -I/home/ramrad01/sources/trunk/gcc/../libdecnumber
> -I/home/ramrad01/sources/trunk/gcc/../libdecnumber/dpd -I../libdecnumber
> -DCLOOG_PPL_BACKEND  -I/usr/include/libelf  insn-output.c -o
> insn-output.o
> /home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
> 'output_1491':
> /home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
> implicit declaration of function
> 'error' [-Werror=implicit-function-declaration]

Emitting diagnostics from the machine description?!  The above is
the right punishment you deserve for that ;))

Consider properly constraining the insns instead.

Richard.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 12:09       ` Richard Guenther
@ 2010-07-08 13:34         ` Richard Earnshaw
  2010-07-08 14:51           ` Richard Guenther
  2010-07-08 13:36         ` Ramana Radhakrishnan
  1 sibling, 1 reply; 18+ messages in thread
From: Richard Earnshaw @ 2010-07-08 13:34 UTC (permalink / raw)
  To: Richard Guenther
  Cc: ramana.radhakrishnan, Manuel López-Ibáñez,
	Diego Novillo, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor


On Thu, 2010-07-08 at 14:03 +0200, Richard Guenther wrote:
> On Thu, Jul 8, 2010 at 1:30 PM, Ramana Radhakrishnan
> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
> > 'output_1491':
> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
> > implicit declaration of function
> > 'error' [-Werror=implicit-function-declaration]
> 
> Emitting diagnostics from the machine description?!  The above is
> the right punishment you deserve for that ;))
> 
> Consider properly constraining the insns instead.

Bzzt! wrong.  These come from the machine-dependent intrinsics.  There's
no insn constraints involved in that part of the process and the code is
correctly generating diagnostics when these are misused.  What else
should it do?

R.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 12:09       ` Richard Guenther
  2010-07-08 13:34         ` Richard Earnshaw
@ 2010-07-08 13:36         ` Ramana Radhakrishnan
  1 sibling, 0 replies; 18+ messages in thread
From: Ramana Radhakrishnan @ 2010-07-08 13:36 UTC (permalink / raw)
  To: Richard Guenther
  Cc: Manuel López-Ibáñez, Diego Novillo,
	Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor


> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
> > 'output_1491':
> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
> > implicit declaration of function
> > 'error' [-Werror=implicit-function-declaration]
> 
> Emitting diagnostics from the machine description?!  The above is
> the right punishment you deserve for that ;))

 It's not very simple to fix this up easily because IIUC the way in
which the neon builtins are set up to expand (1870 of them) makes it
slightly hard to check individually and that probably explains the use
for such a large number of them. Someone will need a deeper look into
how to make sure these work correctly post this shakeup.

The number of backends that are using the diagnostics are listed below
for other target maintainers to deal with the fallout in their
respective targets.

A grep finds calls to some diagnostics in other backends and hopefully
someone else will also catch these. error and internal_error seems to be
the only diagnostics being used.


arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");
arm/neon.md:    error ("lane out of range");

cris/cris.md:                 internal_error ("expand_binop failed in
movsi gotrel");
cris/cris.md:             internal_error ("expand_binop failed in movsi
got");
cris/cris.md:             internal_error ("expand_binop failed in movsi
got+offs");

mmix/mmix.md:   internal_error (\"MMIX Internal: Bad truncdfsf2
expansion\");
mmix/mmix.md:   internal_error (\"MMIX Internal: Bad extendsfdf2
expansion\");

spu/spu-builtins.md:      error ("spu_convtf expects an integer literal
in the range [0, 127].");
spu/spu-builtins.md:      error ("spu_convts expects an integer literal
in the range [0, 127].");
spu/spu-builtins.md:      error ("spu_convtf expects an integer literal
in the range [0, 127].");
spu/spu-builtins.md:      error ("spu_convtu expects an integer literal
in the range [0, 127].");
stormy16/predicates.md:      error ("constant halfword load operand out
of range");
stormy16/predicates.md:      error ("constant arithmetic operand out of
range");

cheers
Ramana



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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 11:30     ` Ramana Radhakrishnan
  2010-07-08 12:09       ` Richard Guenther
@ 2010-07-08 14:02       ` Manuel López-Ibáñez
  2010-07-08 22:04         ` Mark Mitchell
  1 sibling, 1 reply; 18+ messages in thread
From: Manuel López-Ibáñez @ 2010-07-08 14:02 UTC (permalink / raw)
  To: ramana.radhakrishnan
  Cc: Diego Novillo, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 2169 bytes --]

On 8 July 2010 13:30, Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> wrote:
>
> On Thu, 2010-07-08 at 06:23 +0200, Manuel López-Ibáñez wrote:
>> On 7 July 2010 21:25, Diego Novillo <dnovillo@google.com> wrote:
>> > On Tue, Jul 6, 2010 at 05:49, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
>> >
>> >> 2010-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>> >>
>> >>        * toplev.h: Do not include diagnostic-core.h.
>> >>        Include diagnostic-core.h in every file that includes toplev.h.
>> >>        * c-tree.h: Do not include toplev.h.
>> >>
>> >> c-family/
>> >>        * c-common.h: Include diagnostic-core.h. Error if already
>> >>        included.
>> >>        * c-semantics.c: Do not define GCC_DIAG_STYLE here.
>> >> cp/
>> >>        * cp-tree.h: Do not include toplev.h.
>> >>
>> >> java/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >> ada/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >> fortran/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >> lto/
>> >>        * Include diagnostic-core.h in every file that includes toplev.h.
>> >
>> > OK, though the CL should mention the affected files.
>>
>> Done. Committed as revision 161943.
>
>
> Sorry - didn't notice this before but won't this break bootstrap on
> every platform that uses error or any function in diagnostic-core.h in
> the backend machine description.

Sorry I read your email after the commit. TBH, I didn't know about
this. The trivial fix is to add diagnostic-core.h to every gen*c file.
A better fix would be to check which gen*c files do actually need
this. If someone knows/wants to check the latter, feel free to take
this. Otherwise, the patch below should suffice (testing now).

2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* genrecog.c: Include diagnostic-core.h before toplev.h.
	* genoutput.c: Likewise.
	* genextract.c: Likewise.
	* genautomata.c: Likewise.
	* genemit.c: Likewise.
	* genpeep.c: Likewise.
	* genattrtab.c: Likewise.
	* genconditions.c: Likewise.
	* genpreds.c: Likewise.

[-- Attachment #2: toplev.diff --]
[-- Type: text/x-diff, Size: 3834 bytes --]

Index: genrecog.c
===================================================================
--- genrecog.c	(revision 161942)
+++ genrecog.c	(working copy)
@@ -2448,6 +2448,7 @@
 #include \"flags.h\"\n\
 #include \"hard-reg-set.h\"\n\
 #include \"resource.h\"\n\
+#include \"diagnostic-core.h\"\n\
 #include \"toplev.h\"\n\
 #include \"reload.h\"\n\
 #include \"regs.h\"\n\
Index: genoutput.c
===================================================================
--- genoutput.c	(revision 161942)
+++ genoutput.c	(working copy)
@@ -240,6 +240,7 @@
   printf ("#include \"conditions.h\"\n");
   printf ("#include \"insn-attr.h\"\n\n");
   printf ("#include \"recog.h\"\n\n");
+  printf ("#include \"diagnostic-core.h\"\n");
   printf ("#include \"toplev.h\"\n");
   printf ("#include \"output.h\"\n");
   printf ("#include \"target.h\"\n");
Index: genextract.c
===================================================================
--- genextract.c	(revision 161942)
+++ genextract.c	(working copy)
@@ -365,6 +365,7 @@
 #include \"rtl.h\"\n\
 #include \"insn-config.h\"\n\
 #include \"recog.h\"\n\
+#include \"diagnostic-core.h\"\n\
 #include \"toplev.h\"\n\
 \n\
 /* This variable is used as the \"location\" of any missing operand\n\
Index: genautomata.c
===================================================================
--- genautomata.c	(revision 161942)
+++ genautomata.c	(working copy)
@@ -9559,7 +9559,7 @@
 		"#include \"regs.h\"\n"
 		"#include \"output.h\"\n"
 		"#include \"insn-attr.h\"\n"
-		"#include \"toplev.h\"\n"
+                "#include \"diagnostic-core.h\"\n"
 		"#include \"flags.h\"\n"
 		"#include \"function.h\"\n"
 		"#include \"emit-rtl.h\"\n");
Index: genemit.c
===================================================================
--- genemit.c	(revision 161942)
+++ genemit.c	(working copy)
@@ -862,6 +862,7 @@
   printf ("#include \"recog.h\"\n");
   printf ("#include \"resource.h\"\n");
   printf ("#include \"reload.h\"\n");
+  printf ("#include \"diagnostic-core.h\"\n");
   printf ("#include \"toplev.h\"\n");
   printf ("#include \"regs.h\"\n");
   printf ("#include \"tm-constrs.h\"\n");
Index: genpeep.c
===================================================================
--- genpeep.c	(revision 161942)
+++ genpeep.c	(working copy)
@@ -376,6 +376,7 @@
   printf ("#include \"recog.h\"\n");
   printf ("#include \"except.h\"\n");
   printf ("#include \"function.h\"\n");
+  printf ("#include \"diagnostic-core.h\"\n");
   printf ("#include \"toplev.h\"\n");
   printf ("#include \"flags.h\"\n");
   printf ("#include \"tm-constrs.h\"\n\n");
Index: genattrtab.c
===================================================================
--- genattrtab.c	(revision 161942)
+++ genattrtab.c	(working copy)
@@ -4920,7 +4920,8 @@
   printf ("#include \"recog.h\"\n");
   printf ("#include \"regs.h\"\n");
   printf ("#include \"output.h\"\n");
-  printf ("#include \"toplev.h\"\n");
+  printf ("#include \"diagnostic-core.h\"\n"
+          "#include \"toplev.h\"\n");
   printf ("#include \"flags.h\"\n");
   printf ("#include \"function.h\"\n");
   printf ("\n");
Index: genconditions.c
===================================================================
--- genconditions.c	(revision 161942)
+++ genconditions.c	(working copy)
@@ -86,6 +86,7 @@
 #include \"flags.h\"\n\
 #include \"hard-reg-set.h\"\n\
 #include \"resource.h\"\n\
+#include \"diagnostic-core.h\"\n\
 #include \"toplev.h\"\n\
 #include \"reload.h\"\n\
 #include \"tm-constrs.h\"\n");
Index: genpreds.c
===================================================================
--- genpreds.c	(revision 161942)
+++ genpreds.c	(working copy)
@@ -1337,6 +1337,7 @@
 #include \"flags.h\"\n\
 #include \"hard-reg-set.h\"\n\
 #include \"resource.h\"\n\
+#include \"diagnostic-core.h\"\n\
 #include \"toplev.h\"\n\
 #include \"reload.h\"\n\
 #include \"regs.h\"\n\

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 13:34         ` Richard Earnshaw
@ 2010-07-08 14:51           ` Richard Guenther
  2010-07-09 13:49             ` Richard Earnshaw
  0 siblings, 1 reply; 18+ messages in thread
From: Richard Guenther @ 2010-07-08 14:51 UTC (permalink / raw)
  To: Richard Earnshaw
  Cc: ramana.radhakrishnan, Manuel López-Ibáñez,
	Diego Novillo, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor

On Thu, Jul 8, 2010 at 3:33 PM, Richard Earnshaw <rearnsha@arm.com> wrote:
>
> On Thu, 2010-07-08 at 14:03 +0200, Richard Guenther wrote:
>> On Thu, Jul 8, 2010 at 1:30 PM, Ramana Radhakrishnan
>> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
>> > 'output_1491':
>> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
>> > implicit declaration of function
>> > 'error' [-Werror=implicit-function-declaration]
>>
>> Emitting diagnostics from the machine description?!  The above is
>> the right punishment you deserve for that ;))
>>
>> Consider properly constraining the insns instead.
>
> Bzzt! wrong.  These come from the machine-dependent intrinsics.  There's
> no insn constraints involved in that part of the process and the code is
> correctly generating diagnostics when these are misused.  What else
> should it do?

Shouldn't the machine-dependent builtin expander then do the
verification and diagnostic reporting?

Richard.

> R.
>
>

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 14:02       ` Manuel López-Ibáñez
@ 2010-07-08 22:04         ` Mark Mitchell
  2010-07-08 23:37           ` Manuel López-Ibáñez
  0 siblings, 1 reply; 18+ messages in thread
From: Mark Mitchell @ 2010-07-08 22:04 UTC (permalink / raw)
  To: Manuel López-Ibáñez
  Cc: ramana.radhakrishnan, Diego Novillo, Gcc Patch List,
	Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

Manuel López-Ibáñez wrote:

> 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
> 
> 	* genrecog.c: Include diagnostic-core.h before toplev.h.
> 	* genoutput.c: Likewise.
> 	* genextract.c: Likewise.
> 	* genautomata.c: Likewise.
> 	* genemit.c: Likewise.
> 	* genpeep.c: Likewise.
> 	* genattrtab.c: Likewise.
> 	* genconditions.c: Likewise.
> 	* genpreds.c: Likewise.

Go ahead and put this in.  It may be overkill, but it's not *wrong* per
se to declare things we don't need.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 22:04         ` Mark Mitchell
@ 2010-07-08 23:37           ` Manuel López-Ibáñez
  2010-07-08 23:41             ` Mark Mitchell
  0 siblings, 1 reply; 18+ messages in thread
From: Manuel López-Ibáñez @ 2010-07-08 23:37 UTC (permalink / raw)
  To: Mark Mitchell
  Cc: ramana.radhakrishnan, Diego Novillo, Gcc Patch List,
	Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

On 9 July 2010 00:04, Mark Mitchell <mark@codesourcery.com> wrote:
> Manuel López-Ibáñez wrote:
>
>> 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>>
>>       * genrecog.c: Include diagnostic-core.h before toplev.h.
>>       * genoutput.c: Likewise.
>>       * genextract.c: Likewise.
>>       * genautomata.c: Likewise.
>>       * genemit.c: Likewise.
>>       * genpeep.c: Likewise.
>>       * genattrtab.c: Likewise.
>>       * genconditions.c: Likewise.
>>       * genpreds.c: Likewise.
>
> Go ahead and put this in.  It may be overkill, but it's not *wrong* per
> se to declare things we don't need.

Perhaps it would be more robust for the future to have a header for
each gen* program, so they only include 1 header. This header will
contain the actual #includes, so it will be far easier to check what
is included by what. Modifying the headers will not require to modify
and recompile the gen* programs (plus regenerate and recompile the
generated file) but just recompile the generated file. What you think?

Manuel.

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 23:37           ` Manuel López-Ibáñez
@ 2010-07-08 23:41             ` Mark Mitchell
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Mitchell @ 2010-07-08 23:41 UTC (permalink / raw)
  To: Manuel López-Ibáñez
  Cc: ramana.radhakrishnan, Diego Novillo, Gcc Patch List,
	Steven Bosscher, Joseph S. Myers, Ian Lance Taylor

Manuel López-Ibáñez wrote:

> Perhaps it would be more robust for the future to have a header for
> each gen* program, so they only include 1 header. This header will
> contain the actual #includes, so it will be far easier to check what
> is included by what. Modifying the headers will not require to modify
> and recompile the gen* programs (plus regenerate and recompile the
> generated file) but just recompile the generated file. What you think?

I don't think that's going to be a big win; it just moves the #includes
around.  In any case, I'm not overly worried about this kind of
fine-grained detail; I think it's much more important to continue the
overall modularization of the compiler.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

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

* Re: do not include diagnostic-core.h in toplev.h
  2010-07-08 14:51           ` Richard Guenther
@ 2010-07-09 13:49             ` Richard Earnshaw
  0 siblings, 0 replies; 18+ messages in thread
From: Richard Earnshaw @ 2010-07-09 13:49 UTC (permalink / raw)
  To: Richard Guenther
  Cc: ramana.radhakrishnan, Manuel López-Ibáñez,
	Diego Novillo, Gcc Patch List, Steven Bosscher, Joseph S. Myers,
	Ian Lance Taylor


On Thu, 2010-07-08 at 16:51 +0200, Richard Guenther wrote:
> On Thu, Jul 8, 2010 at 3:33 PM, Richard Earnshaw <rearnsha@arm.com> wrote:
> >
> > On Thu, 2010-07-08 at 14:03 +0200, Richard Guenther wrote:
> >> On Thu, Jul 8, 2010 at 1:30 PM, Ramana Radhakrishnan
> >> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md: In function
> >> > 'output_1491':
> >> > /home/ramrad01/sources/trunk/gcc/config/arm/neon.md:4306:5: error:
> >> > implicit declaration of function
> >> > 'error' [-Werror=implicit-function-declaration]
> >>
> >> Emitting diagnostics from the machine description?!  The above is
> >> the right punishment you deserve for that ;))
> >>
> >> Consider properly constraining the insns instead.
> >
> > Bzzt! wrong.  These come from the machine-dependent intrinsics.  There's
> > no insn constraints involved in that part of the process and the code is
> > correctly generating diagnostics when these are misused.  What else
> > should it do?
> 
> Shouldn't the machine-dependent builtin expander then do the
> verification and diagnostic reporting?

It might be possible to make that work, but these patterns are only used
in the intrinsics, so there's no technical difference.  Since they use
UNSPECS, nothing in the MI code will generate them directly.

R.

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

end of thread, other threads:[~2010-07-09 13:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-06  5:50 do not include diagnostic-core.h in toplev.h Manuel López-Ibáñez
2010-07-06 14:31 ` Tobias Burnus
2010-07-06 14:44   ` Manuel López-Ibáñez
2010-07-07 19:16 ` Tom Tromey
2010-07-07 19:25 ` Diego Novillo
2010-07-07 19:39   ` Manuel López-Ibáñez
2010-07-07 20:24     ` Tobias Burnus
2010-07-08  4:24   ` Manuel López-Ibáñez
2010-07-08 11:30     ` Ramana Radhakrishnan
2010-07-08 12:09       ` Richard Guenther
2010-07-08 13:34         ` Richard Earnshaw
2010-07-08 14:51           ` Richard Guenther
2010-07-09 13:49             ` Richard Earnshaw
2010-07-08 13:36         ` Ramana Radhakrishnan
2010-07-08 14:02       ` Manuel López-Ibáñez
2010-07-08 22:04         ` Mark Mitchell
2010-07-08 23:37           ` Manuel López-Ibáñez
2010-07-08 23:41             ` Mark Mitchell

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