Commit 9f6eb0f4 by Nathan Sidwell Committed by Nathan Sidwell

vec.h (VEC_T_safe_push, [...]): Tweak for when size_t is bigger than int.

	* vec.h (VEC_T_safe_push, VEC_T_safe_insert): Tweak for when
	size_t is bigger than int.

From-SVN: r83855
parent 46e995e0
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> 2004-06-29 Paul Brook <paul@codesourcery.com>
* target-def.h (TARGET_CXX_GET_COOKIE_SIZE, * target-def.h (TARGET_CXX_GET_COOKIE_SIZE,
......
...@@ -339,7 +339,7 @@ static inline TDEF *VEC_OP (TDEF,safe_push) \ ...@@ -339,7 +339,7 @@ static inline TDEF *VEC_OP (TDEF,safe_push) \
(VEC (TDEF) **vec_, TDEF obj_) \ (VEC (TDEF) **vec_, TDEF obj_) \
{ \ { \
if (!*vec_ || (*vec_)->num == (*vec_)->alloc) \ 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_); \ return VEC_OP (TDEF,quick_push) (*vec_, obj_); \
} \ } \
...@@ -385,7 +385,7 @@ static inline TDEF *VEC_OP (TDEF,safe_insert) \ ...@@ -385,7 +385,7 @@ static inline TDEF *VEC_OP (TDEF,safe_insert) \
(VEC (TDEF) **vec_, size_t ix_, TDEF obj_) \ (VEC (TDEF) **vec_, size_t ix_, TDEF obj_) \
{ \ { \
if (!*vec_ || (*vec_)->num == (*vec_)->alloc) \ 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_); \ return VEC_OP (TDEF,quick_insert) (*vec_, ix_, obj_); \
} \ } \
...@@ -495,7 +495,7 @@ static inline TDEF *VEC_OP (TDEF,safe_push) \ ...@@ -495,7 +495,7 @@ static inline TDEF *VEC_OP (TDEF,safe_push) \
(VEC (TDEF) **vec_, const TDEF *obj_) \ (VEC (TDEF) **vec_, const TDEF *obj_) \
{ \ { \
if (!*vec_ || (*vec_)->num == (*vec_)->alloc) \ 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_); \ return VEC_OP (TDEF,quick_push) (*vec_, obj_); \
} \ } \
...@@ -539,7 +539,7 @@ static inline TDEF *VEC_OP (TDEF,safe_insert) \ ...@@ -539,7 +539,7 @@ static inline TDEF *VEC_OP (TDEF,safe_insert) \
(VEC (TDEF) **vec_, size_t ix_, const TDEF *obj_) \ (VEC (TDEF) **vec_, size_t ix_, const TDEF *obj_) \
{ \ { \
if (!*vec_ || (*vec_)->num == (*vec_)->alloc) \ 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_); \ return VEC_OP (TDEF,quick_insert) (*vec_, ix_, obj_); \
} \ } \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment