vec.h (VEC_T_safe_push, [...]): Tweak for when size_t is bigger than int.
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 29 Jun 2004 15:56:17 +0000 (15:56 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 29 Jun 2004 15:56:17 +0000 (15:56 +0000)
* vec.h (VEC_T_safe_push, VEC_T_safe_insert): Tweak for when
size_t is bigger than int.

From-SVN: r83855

gcc/ChangeLog
gcc/vec.h

index 3ad291e0a924a18a820988bede589904700d82c5..1696238c5e6c5e1f4a5ab41bf5c91fe8c86420c9 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * vec.h (VEC_T_safe_push, VEC_T_safe_insert): Tweak for when
+       size_t is bigger than int.
+
 2004-06-29  Paul Brook  <paul@codesourcery.com>
 
        * target-def.h (TARGET_CXX_GET_COOKIE_SIZE,
index d0cc477688b45a5105f7748bc28d376f36132791..86d2a111c327142f253bb52ca3b66d980939cd4c 100644 (file)
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -339,7 +339,7 @@ static inline TDEF *VEC_OP (TDEF,safe_push)                           \
      (VEC (TDEF) **vec_, TDEF obj_)                                      \
 {                                                                        \
   if (!*vec_ || (*vec_)->num == (*vec_)->alloc)                                  \
-    VEC_OP (TDEF,reserve) (vec_, ~0u);                                   \
+    VEC_OP (TDEF,reserve) (vec_, ~(size_t)0);                            \
                                                                          \
   return VEC_OP (TDEF,quick_push) (*vec_, obj_);                         \
 }                                                                        \
@@ -385,7 +385,7 @@ static inline TDEF *VEC_OP (TDEF,safe_insert)                                 \
      (VEC (TDEF) **vec_, size_t ix_, TDEF obj_)                          \
 {                                                                        \
   if (!*vec_ || (*vec_)->num == (*vec_)->alloc)                                  \
-    VEC_OP (TDEF,reserve) (vec_, ~0u);                                   \
+    VEC_OP (TDEF,reserve) (vec_, ~(size_t)0);                            \
                                                                          \
   return VEC_OP (TDEF,quick_insert) (*vec_, ix_, obj_);                          \
 }                                                                        \
@@ -495,7 +495,7 @@ static inline TDEF *VEC_OP (TDEF,safe_push)                           \
      (VEC (TDEF) **vec_, const TDEF *obj_)                               \
 {                                                                        \
   if (!*vec_ || (*vec_)->num == (*vec_)->alloc)                                  \
-    VEC_OP (TDEF,reserve) (vec_, ~0u);                                   \
+    VEC_OP (TDEF,reserve) (vec_, ~(size_t)0);                            \
                                                                          \
   return VEC_OP (TDEF,quick_push) (*vec_, obj_);                         \
 }                                                                        \
@@ -539,7 +539,7 @@ static inline TDEF *VEC_OP (TDEF,safe_insert)                                 \
      (VEC (TDEF) **vec_, size_t ix_, const TDEF *obj_)                   \
 {                                                                        \
   if (!*vec_ || (*vec_)->num == (*vec_)->alloc)                                  \
-    VEC_OP (TDEF,reserve) (vec_, ~0u);                                   \
+    VEC_OP (TDEF,reserve) (vec_, ~(size_t)0);                            \
                                                                          \
   return VEC_OP (TDEF,quick_insert) (*vec_, ix_, obj_);                          \
 }                                                                        \