This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix includes of sparseset.*

On Wed, Nov 28, 2007 at 10:44:12AM -0700, Tom Tromey wrote:
>>>>>> "Bernhard" == Bernhard Fischer <> writes:
>Bernhard> 	* sparseset.h: Include config.h before system.h
>Bernhard> 	* sparseset.c: Remove inclusion of libiberty.h
>I think it is a bit odd to include config.h from a header.
>Instead, I think as a rule every .c file should include config.h as
>the first header.

Updated patch attached. Bootstrapped and regtested on i386-linux-gnu
without any new regression. Ok for trunk?

2007-11-27  Bernhard Fischer  <>

        * sparseset.c: Include config.h and system.h before sparseset.h.
        * sparseset.h: Remove inclusion of system.h.

Index: gcc-4.3/gcc/sparseset.c
--- gcc-4.3/gcc/sparseset.c	(revision 130499)
+++ gcc-4.3/gcc/sparseset.c	(working copy)
@@ -18,10 +18,10 @@ You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <>.  */
-#include "libiberty.h"
+#include "config.h"
+#include "system.h"
 #include "sparseset.h"
 /* Allocate and clear a n_elms SparseSet.  */
Index: gcc-4.3/gcc/sparseset.h
--- gcc-4.3/gcc/sparseset.h	(revision 130499)
+++ gcc-4.3/gcc/sparseset.h	(working copy)
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3.  
-#include "system.h"
 #include <assert.h>
@@ -32,7 +31,7 @@ along with GCC; see the file COPYING3.  
 typedef struct sparseset_def
   SPARSESET_ELT_TYPE *dense;	/* Dense array.  */
-  SPARSESET_ELT_TYPE *sparse; 	/* Sparse array.  */
+  SPARSESET_ELT_TYPE *sparse;	/* Sparse array.  */
   SPARSESET_ELT_TYPE members;	/* Number of elements.  */
   SPARSESET_ELT_TYPE size;	/* Maximum number of elements.  */
   SPARSESET_ELT_TYPE iter;	/* Iterator index.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]