fold-const.c (const_binop): Adjust comment.
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 26 Nov 2012 12:01:07 +0000 (12:01 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 26 Nov 2012 12:01:07 +0000 (12:01 +0000)
* fold-const.c (const_binop): Adjust comment.
(extract_muldiv_1): Likewise.
(fold_comparison): Likewise.
* stor-layout.c (place_field): Fix typo.
* tree.c (double_int_fits_to_tree_p): Remove obsolete comment.
(force_fit_type_double): Likewise.  Fix long line.

From-SVN: r193812

gcc/ChangeLog
gcc/fold-const.c
gcc/stor-layout.c
gcc/tree.c

index 5a48e1be50983d38e4412fe6f2cf83040c7cc2c4..848be9715ffac33750438636de979926cc4291c3 100644 (file)
@@ -1,3 +1,12 @@
+2012-11-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * fold-const.c (const_binop): Adjust comment.
+       (extract_muldiv_1): Likewise.
+       (fold_comparison): Likewise.
+       * stor-layout.c (place_field): Fix typo.
+       * tree.c (double_int_fits_to_tree_p): Remove obsolete comment.
+       (force_fit_type_double): Likewise.  Fix long line.
+
 2012-11-26  Greta Yorsh  <Greta.Yorsh@arm.com>
 
        * config/arm/arm.h (TARGET_LDRD): Reject Thumb1 targets.
index 4dcd3220390e335a4c1a5f34f5b85356d0f3ad53..98ef84fdf27f6e127f4e97f20ef578274c866fb6 100644 (file)
@@ -1359,7 +1359,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2)
   return NULL_TREE;
 }
 
-/* Create a size type INT_CST node with NUMBER sign extended.  KIND
+/* Create a sizetype INT_CST node with NUMBER sign extended.  KIND
    indicates which particular sizetype to create.  */
 
 tree
@@ -5809,11 +5809,9 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type,
       else
        break;
 
-      /* If we have an unsigned type is not a sizetype, we cannot widen
-        the operation since it will change the result if the original
-        computation overflowed.  */
-      if (TYPE_UNSIGNED (ctype)
-         && ctype != type)
+      /* If we have an unsigned type, we cannot widen the operation since it
+        will change the result if the original computation overflowed.  */
+      if (TYPE_UNSIGNED (ctype) && ctype != type)
        break;
 
       /* If we were able to eliminate our operation from the first side,
@@ -9006,7 +9004,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
            }
          /* We can simplify the comparison to a comparison of the variable
             offset parts if the constant offset parts are equal.
-            Be careful to use signed size type here because otherwise we
+            Be careful to use signed sizetype here because otherwise we
             mess with array offsets in the wrong way.  This is possible
             because pointer arithmetic is restricted to retain within an
             object and overflow on pointer differences is undefined as of
@@ -9016,11 +9014,11 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
                       || (indirect_base0 && DECL_P (base0))
                       || POINTER_TYPE_OVERFLOW_UNDEFINED))
            {
-             /* By converting to signed size type we cover middle-end pointer
+             /* By converting to signed sizetype we cover middle-end pointer
                 arithmetic which operates on unsigned pointer types of size
                 type size and ARRAY_REF offsets which are properly sign or
                 zero extended from their type in case it is narrower than
-                size type.  */
+                sizetype.  */
              if (offset0 == NULL_TREE)
                offset0 = build_int_cst (ssizetype, 0);
              else
index b1b7cb29fc4f0fdd4449fc3a313ed47e9720ef14..4ac24f1fc3d3060768ef5c4a27629f50f3def04a 100644 (file)
@@ -1374,7 +1374,7 @@ place_field (record_layout_info rli, tree field)
          normalize_rli (rli);
         }
 
-      /* If we're starting a new run of same size type bitfields
+      /* If we're starting a new run of same type size bitfields
         (or a run of non-bitfields), set up the "first of the run"
         fields.
 
index 8b2a4f9f7356784ee870a03f25debd14e05872e5..7cacb2a0d64c072457694eb19abd080c9a4ebe09 100644 (file)
@@ -1074,7 +1074,6 @@ double_int_to_tree (tree type, double_int cst)
 bool
 double_int_fits_to_tree_p (const_tree type, double_int cst)
 {
-  /* Size types *are* sign extended.  */
   bool sign_extended_type = !TYPE_UNSIGNED (type);
 
   double_int ext
@@ -1102,10 +1101,7 @@ tree
 force_fit_type_double (tree type, double_int cst, int overflowable,
                       bool overflowed)
 {
-  bool sign_extended_type;
-
-  /* Size types *are* sign extended.  */
-  sign_extended_type = !TYPE_UNSIGNED (type);
+  bool sign_extended_type = !TYPE_UNSIGNED (type);
 
   /* If we need to set overflow flags, return a new unshared node.  */
   if (overflowed || !double_int_fits_to_tree_p(type, cst))
@@ -1115,8 +1111,8 @@ force_fit_type_double (tree type, double_int cst, int overflowable,
          || (overflowable > 0 && sign_extended_type))
        {
          tree t = make_node (INTEGER_CST);
-         TREE_INT_CST (t) = cst.ext (TYPE_PRECISION (type),
-                                            !sign_extended_type);
+         TREE_INT_CST (t)
+           = cst.ext (TYPE_PRECISION (type), !sign_extended_type);
          TREE_TYPE (t) = type;
          TREE_OVERFLOW (t) = 1;
          return t;