OSDN Git Service

PR tree-optimization/18815
[pf3gnuchains/gcc-fork.git] / gcc / vec.h
index d6fc8ad..945a413 100644 (file)
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -29,7 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    out-of-line generic functions.  The vectors are designed to
    interoperate with the GTY machinery.
 
-   Because of the different behaviour of objects and of pointers to
+   Because of the different behavior of objects and of pointers to
    objects, there are two flavors.  One to deal with a vector of
    pointers to objects, and one to deal with a vector of objects
    themselves.  Both of these pass pointers to objects around -- in
@@ -186,11 +186,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    
    int VEC_T_space (VEC(T) *v,int reserve)
 
-   If V has space for RESERVE additional entries, return non-zero.  If
+   If V has space for RESERVE additional entries, return nonzero.  If
    RESERVE is < 0, ensure there is at least one space slot.  You
    usually only need to use this if you are doing your own vector
    reallocation, for instance on an embedded vector.  This returns
-   non-zero in exactly the same circumstances that VEC_T_reserve
+   nonzero in exactly the same circumstances that VEC_T_reserve
    will.  */
 
 #define VEC_space(TDEF,V,R)    (VEC_OP(TDEF,space)(V,R))
@@ -200,10 +200,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
    Ensure that V has at least RESERVE slots available, if RESERVE is
    >= 0.  If RESERVE < 0, ensure that there is at least one spare
-   slot.  These differ in their reallocation behaviour, the first will
+   slot.  These differ in their reallocation behavior, the first will
    not create additional headroom, but the second mechanism will
    perform the usual exponential headroom increase.  Note this can
-   cause V to be reallocated.  Returns non-zero iff reallocation
+   cause V to be reallocated.  Returns nonzero iff reallocation
    actually occurred.  */
 
 #define VEC_reserve(TDEF,V,R)  (VEC_OP(TDEF,reserve)(&(V),R MEM_STAT_INFO))
@@ -323,7 +323,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    
    Find the first position in which VAL could be inserted without
    changing the ordering of V.  LESSTHAN is a function that returns
-   true if the first argument is strictly less than the second.   */
+   true if the first argument is strictly less than the second.  */
    
 #define VEC_lower_bound(TDEF,V,O,LT)    \
        (VEC_OP(TDEF,lower_bound)(V,O,LT VEC_CHECK_INFO))
@@ -452,13 +452,13 @@ static inline int VEC_OP (TDEF,space)                                       \
      (VEC (TDEF) *vec_, int alloc_)                                      \
 {                                                                        \
   return vec_ ? ((vec_)->alloc - (vec_)->num                             \
-                < (unsigned)(alloc_ < 0 ? 1 : alloc_)) : alloc_ != 0;    \
+                >= (unsigned)(alloc_ < 0 ? 1 : alloc_)) : !alloc_;       \
 }                                                                        \
                                                                          \
 static inline int VEC_OP (TDEF,reserve)                                          \
      (VEC (TDEF) **vec_, int alloc_ MEM_STAT_DECL)                       \
 {                                                                        \
-  int extend = VEC_OP (TDEF,space) (*vec_, alloc_);                      \
+  int extend = !VEC_OP (TDEF,space) (*vec_, alloc_);                     \
                                                                          \
   if (extend)                                                            \
     *vec_ = (VEC (TDEF) *) vec_##a##_p_reserve (*vec_, alloc_ PASS_MEM_STAT);   \
@@ -683,13 +683,13 @@ static inline int VEC_OP (TDEF,space)                                       \
      (VEC (TDEF) *vec_, int alloc_)                                      \
 {                                                                        \
   return vec_ ? ((vec_)->alloc - (vec_)->num                             \
-                < (unsigned)(alloc_ < 0 ? 1 : alloc_)) : alloc_ != 0;    \
+                >= (unsigned)(alloc_ < 0 ? 1 : alloc_)) : !alloc_;       \
 }                                                                        \
                                                                          \
 static inline int VEC_OP (TDEF,reserve)                                          \
      (VEC (TDEF) **vec_, int alloc_ MEM_STAT_DECL)                       \
 {                                                                        \
-  int extend = VEC_OP (TDEF,space) (*vec_, alloc_);                      \
+  int extend = !VEC_OP (TDEF,space) (*vec_, alloc_);                     \
                                                                          \
   if (extend)                                                            \
     *vec_ = (VEC (TDEF) *) vec_##a##_o_reserve (*vec_, alloc_,           \