This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[patch] Fix bootstrap with GATHER_STATISTICS


This patch fixes c++ compatibility warnings in functions that are only
compiled when building with --enable-gather-detailed-mem-stats.

2009-04-30  Rafael Avila de Espindola  <espindola@google.com>

	* alloc-pool.c (alloc_pool_descriptor): Use an insert_opion value
	instead of an int.
	* bitmap.c (bitmap_descriptor): Likewise.
	* ggc-common.c (loc_descriptor): Likewise.
	* varray.c (varray_descriptor): Likewise.
	* vec.c (vec_descriptor): Likewise.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c
index 1734ba4..c9d9904 100644
--- a/gcc/alloc-pool.c
+++ b/gcc/alloc-pool.c
@@ -116,7 +116,7 @@ alloc_pool_descriptor (const char *name)
   slot = (struct alloc_pool_descriptor **)
     htab_find_slot_with_hash (alloc_pool_hash, name,
 			      htab_hash_pointer (name),
-			      1);
+			      INSERT);
   if (*slot)
     return *slot;
   *slot = XCNEW (struct alloc_pool_descriptor);
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 6230adb..c9a226a 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -87,7 +87,7 @@ bitmap_descriptor (const char *file, const char *function, int line)
   slot = (struct bitmap_descriptor **)
     htab_find_slot_with_hash (bitmap_desc_hash, &loc,
 			      htab_hash_pointer (file) + line,
-			      1);
+			      INSERT);
   if (*slot)
     return *slot;
   *slot = XCNEW (struct bitmap_descriptor);
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 747ec4c..b6b9e1e 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -845,7 +845,7 @@ loc_descriptor (const char *name, int line, const char *function)
   if (!loc_hash)
     loc_hash = htab_create (10, hash_descriptor, eq_descriptor, NULL);
 
-  slot = (struct loc_descriptor **) htab_find_slot (loc_hash, &loc, 1);
+  slot = (struct loc_descriptor **) htab_find_slot (loc_hash, &loc, INSERT);
   if (*slot)
     return *slot;
   *slot = XCNEW (struct loc_descriptor);
diff --git a/gcc/varray.c b/gcc/varray.c
index d8e35b1..91e5b5d 100644
--- a/gcc/varray.c
+++ b/gcc/varray.c
@@ -71,7 +71,7 @@ varray_descriptor (const char *name)
   slot = (struct varray_descriptor **)
     htab_find_slot_with_hash (varray_hash, name,
 		    	      htab_hash_pointer (name),
-			      1);
+			      INSERT);
   if (*slot)
     return *slot;
   *slot = XCNEW (struct varray_descriptor);
diff --git a/gcc/vec.c b/gcc/vec.c
index 1456782..530cd1a 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -113,7 +113,8 @@ vec_descriptor (const char *name, int line, const char *function)
   if (!vec_desc_hash)
     vec_desc_hash = htab_create (10, hash_descriptor, eq_descriptor, NULL);
 
-  slot = (struct vec_descriptor **) htab_find_slot (vec_desc_hash, &loc, 1);
+  slot = (struct vec_descriptor **) htab_find_slot (vec_desc_hash, &loc,
+						    INSERT);
   if (*slot)
     return *slot;
   *slot = XCNEW (struct vec_descriptor);

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