h8300.c (single_one_operand): Fix a warning.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 3 Dec 2002 14:36:41 +0000 (14:36 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 3 Dec 2002 14:36:41 +0000 (14:36 +0000)
* config/h8300/h8300.c (single_one_operand): Fix a warning.
(single_zero_operand): Likewise.

From-SVN: r59772

gcc/ChangeLog
gcc/config/h8300/h8300.c

index 7b4eecb550e4d4e8be2d1ffb41f9e6bf1ceb3a40..a0e4f2ce3ba12286f3d6a4ae47503995dede24b5 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-03  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (single_one_operand): Fix a warning.
+       (single_zero_operand): Likewise.
+
 2002-12-02  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (dosize): Replace argument op with
index 71e3477a60305a2e44dcaf6f53a87c42a928586b..0d81b7071bc89a1c9fe9c6585dbe7a3d2f6471f9 100644 (file)
@@ -816,7 +816,7 @@ single_one_operand (operand, mode)
       unsigned HOST_WIDE_INT mask =
        (GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT)
        ? ((unsigned HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (mode)) - 1
-       : ~0;
+       : ~(unsigned HOST_WIDE_INT) 0;
       unsigned HOST_WIDE_INT value = INTVAL (operand);
 
       if (exact_log2 (value & mask) >= 0)
@@ -841,7 +841,7 @@ single_zero_operand (operand, mode)
       unsigned HOST_WIDE_INT mask =
        (GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT)
        ? ((unsigned HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (mode)) - 1
-       : ~0;
+       : ~(unsigned HOST_WIDE_INT) 0;
       unsigned HOST_WIDE_INT value = INTVAL (operand);
 
       if (exact_log2 (~value & mask) >= 0)