diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 15:56:17 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 15:56:17 +0000 |
commit | 33d464a0d78f78bd3702b35b1122e68eb60d2d18 (patch) | |
tree | 91d4cdec9e65182e4e0a02b60f2924245daa31d1 /gcc | |
parent | 600f4be72c2b85173c384b38c1c0be907583a931 (diff) | |
download | gcc-33d464a0d78f78bd3702b35b1122e68eb60d2d18.tar.gz |
* vec.h (VEC_T_safe_push, VEC_T_safe_insert): Tweak for when
size_t is bigger than int.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83855 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/vec.h | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ad291e0a92..1696238c5e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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, diff --git a/gcc/vec.h b/gcc/vec.h index d0cc477688b..86d2a111c32 100644 --- 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_); \ } \ |