c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
authorUros Bizjak <ubizjak@gmail.com>
Fri, 22 Jul 2016 14:09:55 +0000 (16:09 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 22 Jul 2016 14:09:55 +0000 (16:09 +0200)
c/ChangeLog:

* c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,

c-family/ChangeLog:

* c-common.c: Use HOST_WIDE_INT_M1U instead of
~(unsigned HOST_WIDE_INT) 0.

From-SVN: r238643

gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-typeck.c

index ba6093af6f68f74f208dd3135825c368f10f27da..a2184ad6756a81d1f0b3432add1478054255d403 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
+
+       * c-common.c: Use HOST_WIDE_INT_M1U instead of
+       ~(unsigned HOST_WIDE_INT) 0.
+
 2016-07-22  Martin Liska  <mliska@suse.cz>
 
        PR gcov-profile/69028
index 9900e93ffc29a79ef4d255cd06d2f6dd8df0ca63..1cc61ee7e13b608b2509665fa001fa060ad04278 100644 (file)
@@ -11999,7 +11999,7 @@ warn_for_sign_compare (location_t location,
           if (bits < TYPE_PRECISION (result_type)
               && bits < HOST_BITS_PER_LONG && unsignedp)
             {
-              mask = (~ (unsigned HOST_WIDE_INT) 0) << bits;
+              mask = HOST_WIDE_INT_M1U << bits;
               if ((mask & constant) != mask)
                {
                  if (constant == 0)
index 397bbf8ad5b4d6be3bd053d09508f065ff6a7d93..b1c42ff4ca536f09b82377c0bf971033f53889d7 100644 (file)
@@ -1,3 +1,7 @@
+2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
+
+       * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
+
 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
 
        * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
index 0b5ab91d0d5f1ee07dcdfbea292244f8f9637906..07e39ef04d1b4c95bc9db4df2bc9d3389c3238c5 100644 (file)
@@ -8594,7 +8594,7 @@ set_nonincremental_init_from_string (tree str,
          bitpos = ((wchar_bytes - 1) * charwidth) + HOST_BITS_PER_CHAR;
          if (bitpos < HOST_BITS_PER_WIDE_INT)
            {
-             if (val[0] & (((HOST_WIDE_INT) 1) << (bitpos - 1)))
+             if (val[0] & (HOST_WIDE_INT_1 << (bitpos - 1)))
                {
                  val[0] |= HOST_WIDE_INT_M1U << bitpos;
                  val[1] = -1;
@@ -8605,7 +8605,7 @@ set_nonincremental_init_from_string (tree str,
              if (val[0] < 0)
                val[1] = -1;
            }
-         else if (val[1] & (((HOST_WIDE_INT) 1)
+         else if (val[1] & (HOST_WIDE_INT_1
                             << (bitpos - 1 - HOST_BITS_PER_WIDE_INT)))
            val[1] |= HOST_WIDE_INT_M1U << (bitpos - HOST_BITS_PER_WIDE_INT);
        }