This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcc-in-cxx] Add cast to vec.h
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Jun 2008 00:26:00 -0700
- Subject: [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; \
} \
} \