On Fri, May 1, 2009 at 4:13 PM, Joseph S. Myers <jos...@codesourcery.com> wrote:
> On Fri, 1 May 2009, Steven Bosscher wrote:
>
>> Eh, ouch.
>>
>> I'll see if I can clean this up.  I don't believe for 90% of these
>> files that they should include c-common.h / c-tree.h.  Looks like
>> history and the usual carelessness when adding #include lines to new
>> files/passes.
>
> Thanks!  I agree most of the cleanup should be straighforward; the files
> can't actually be using any *functions* that are C-specific or the non-C
> compilers wouldn't link.  (The c-tree.h inclusions in c-family files may
> be for functions both C and C++ define; in such cases, the prototypes
> should move to a shared header.)

Actually nothing uses it, except one case of %qE.  And some passes
forgot to include splay-tree.h but got it via c-*.h.

This is what I am bootstrapping.  I still need to go over Makefile.in.
 If the bootstrap completes without problems, I'll commit this patch +
necessary Makefile.in bits as obvious.

Ciao!
Steven

        * ipa-reference.c: Do not include c-common.h, include splay-tree.h.
        * ipa-utils.c: Likewise.
        * ipa-type-escape.c: Likewise.
        * cgraphunit.c Do not include c-common.h.
        * ipa-pure-const.c: Likewise.
        * tree-if-conv.c: Likewise.
        * matrix-reorg.c: Do not include c-common.h and c-tree.h.
        * ipa-struct-reorg.c: Likewise.
        * tree-nomudflap.c: Likewise.
        * tree-ssa-structalias.c: Likewise.
        (emit_pointer_definition): Do not use %qE.

Index: ipa-reference.c
===================================================================
--- ipa-reference.c     (revision 147033)
+++ ipa-reference.c     (working copy)
@@ -57,10 +57,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "langhooks.h"
 #include "pointer-set.h"
+#include "splay-tree.h"
 #include "ggc.h"
 #include "ipa-utils.h"
 #include "ipa-reference.h"
-#include "c-common.h"
 #include "gimple.h"
 #include "cgraph.h"
 #include "output.h"
Index: ipa-utils.c
===================================================================
--- ipa-utils.c (revision 147033)
+++ ipa-utils.c (working copy)
@@ -28,10 +28,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "langhooks.h"
 #include "pointer-set.h"
+#include "splay-tree.h"
 #include "ggc.h"
 #include "ipa-utils.h"
 #include "ipa-reference.h"
-#include "c-common.h"
 #include "gimple.h"
 #include "cgraph.h"
 #include "output.h"
Index: ipa-type-escape.c
===================================================================
--- ipa-type-escape.c   (revision 147033)
+++ ipa-type-escape.c   (working copy)
@@ -43,10 +43,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "langhooks.h"
 #include "pointer-set.h"
+#include "splay-tree.h"
 #include "ggc.h"
 #include "ipa-utils.h"
 #include "ipa-type-escape.h"
-#include "c-common.h"
 #include "gimple.h"
 #include "cgraph.h"
 #include "output.h"
Index: cgraphunit.c
===================================================================
--- cgraphunit.c        (revision 147033)
+++ cgraphunit.c        (working copy)
@@ -126,7 +126,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "timevar.h"
 #include "params.h"
 #include "fibheap.h"
-#include "c-common.h"
 #include "intl.h"
 #include "function.h"
 #include "ipa-prop.h"
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c    (revision 147033)
+++ ipa-pure-const.c    (working copy)
@@ -43,7 +43,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "pointer-set.h"
 #include "ggc.h"
 #include "ipa-utils.h"
-#include "c-common.h"
 #include "gimple.h"
 #include "cgraph.h"
 #include "output.h"
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c      (revision 147033)
+++ tree-if-conv.c      (working copy)
@@ -85,7 +85,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "c-common.h"
 #include "flags.h"
 #include "timevar.h"
 #include "varray.h"
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c      (revision 147033)
+++ matrix-reorg.c      (working copy)
@@ -115,7 +115,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
-#include "c-tree.h"
 #include "tree-inline.h"
 #include "tree-flow.h"
 #include "tree-flow-inline.h"
@@ -131,7 +130,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "timevar.h"
 #include "params.h"
 #include "fibheap.h"
-#include "c-common.h"
 #include "intl.h"
 #include "function.h"
 #include "basic-block.h"
Index: ipa-struct-reorg.c
===================================================================
--- ipa-struct-reorg.c  (revision 147033)
+++ ipa-struct-reorg.c  (working copy)
@@ -34,7 +34,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "pointer-set.h"
 #include "hashtab.h"
-#include "c-tree.h"
 #include "toplev.h"
 #include "flags.h"
 #include "debug.h"
@@ -53,7 +52,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "opts.h"
 #include "ipa-type-escape.h"
 #include "tree-dump.h"
-#include "c-common.h"
 #include "gimple.h"

 /* This optimization implements structure peeling.
Index: tree-nomudflap.c
===================================================================
--- tree-nomudflap.c    (revision 147033)
+++ tree-nomudflap.c    (working copy)
@@ -26,8 +26,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "tree-inline.h"
-#include "c-tree.h"
-#include "c-common.h"
 #include "gimple.h"
 #include "diagnostic.h"
 #include "hashtab.h"
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c      (revision 147033)
+++ tree-ssa-structalias.c      (working copy)
@@ -32,11 +32,9 @@
 #include "basic-block.h"
 #include "output.h"
 #include "tree.h"
-#include "c-common.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
 #include "varray.h"
-#include "c-tree.h"
 #include "diagnostic.h"
 #include "toplev.h"
 #include "gimple.h"
@@ -4707,7 +4705,7 @@ emit_pointer_definition (tree ptr, bitmap visited)
                emit_pointer_definition (arg, visited);
            }
          else
-           inform (0, "initialized from %qE", arg);
+           inform (0, "initialized from %qs", IDENTIFIER_POINTER (arg));
        }
     }
   else if (!gimple_nop_p (def))

Reply via email to