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 committed: Fix vec.h for --enable-gather-detailed-mem-stats


Martin Jambor <mjambor@suse.cz> writes:

> Since this commit, I cannot compile GCC configured with
> --enable-gather-detailed-mem-stats due to syntax errors in
> gcc/df-scan.c which are pasted below.

I have committed this patch to fix this problem.  Bootstrapped and
tested on i686-unknown-linux-gnu.

Ian


2009-06-16  Ian Lance Taylor  <iant@google.com>

	* vec.h (VEC_stack_alloc): Define different version if
	GATHER_STATISTICS is defined, to accept and ignore MEM_STAT.
	(DEF_VEC_ALLOC_FUNC_P_STACK): Remove MEM_STAT_DECL.
	(DEF_VEC_ALLOC_FUNC_O_STACK): Likewise.
	(DEF_VEC_ALLOC_FUNC_I_STACK): Likewise.


Index: vec.h
===================================================================
--- vec.h	(revision 148542)
+++ vec.h	(working copy)
@@ -1229,9 +1229,15 @@ extern void *vec_stack_o_reserve_exact (
 					 MEM_STAT_DECL);
 extern void vec_stack_free (void *);
 
+#ifdef GATHER_STATISTICS
+#define VEC_stack_alloc(T,alloc,name,line,function)			  \
+  (VEC_OP (T,stack,alloc1)						  \
+   (alloc, XALLOCAVAR (VEC(T,stack), VEC_embedded_size (T, alloc))))
+#else
 #define VEC_stack_alloc(T,alloc)					  \
   (VEC_OP (T,stack,alloc1)						  \
    (alloc, XALLOCAVAR (VEC(T,stack), VEC_embedded_size (T, alloc))))
+#endif
 
 #define DEF_VEC_ALLOC_P_STACK(T)					  \
 VEC_TA(T,base,stack);							  \
@@ -1241,9 +1247,9 @@ struct vec_swallow_trailing_semi
 
 #define DEF_VEC_ALLOC_FUNC_P_STACK(T)					  \
 static inline VEC(T,stack) *VEC_OP (T,stack,alloc1)			  \
-     (int alloc_, VEC(T,stack)* space MEM_STAT_DECL)			  \
+     (int alloc_, VEC(T,stack)* space)					  \
 {									  \
-   return (VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space); \
+  return (VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space);	  \
 }
 
 #define DEF_VEC_ALLOC_O_STACK(T)					  \
@@ -1254,9 +1260,9 @@ struct vec_swallow_trailing_semi
 
 #define DEF_VEC_ALLOC_FUNC_O_STACK(T)					  \
 static inline VEC(T,stack) *VEC_OP (T,stack,alloc1)			  \
-     (int alloc_, VEC(T,stack)* space MEM_STAT_DECL)			  \
+     (int alloc_, VEC(T,stack)* space)					  \
 {									  \
-  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space); \
+  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space);	  \
 }
 
 #define DEF_VEC_ALLOC_I_STACK(T)					  \
@@ -1267,9 +1273,9 @@ struct vec_swallow_trailing_semi
 
 #define DEF_VEC_ALLOC_FUNC_I_STACK(T)					  \
 static inline VEC(T,stack) *VEC_OP (T,stack,alloc1)			  \
-     (int alloc_, VEC(T,stack)* space MEM_STAT_DECL)			  \
+     (int alloc_, VEC(T,stack)* space)					  \
 {									  \
-  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space); \
+  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space);   \
 }
 
 #endif /* GCC_VEC_H */

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