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]

[gcc-in-cxx] Add cast to vec.h


On the gcc-in-cxx branch, I committed this cast to vec.h to avoid
compilation warnings when using DEF_VEC.

Ian


2008-06-30  Ian Lance Taylor  <iant@google.com>

	* vec.h (DEF_VEC_FUNC_P) [iterate]: Add cast for constant 0.


Index: vec.h
===================================================================
--- vec.h	(revision 137266)
+++ vec.h	(working copy)
@@ -547,7 +547,7 @@ static inline int VEC_OP (T,base,iterate
     }									  \
   else									  \
     {									  \
-      *ptr = 0;								  \
+      *ptr = (T) 0;							  \
       return 0;								  \
     }									  \
 }									  \

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