(build_binary_op): Improve shift warning messages.
authorRichard Stallman <rms@gnu.org>
Thu, 16 Jul 1992 19:26:42 +0000 (19:26 +0000)
committerRichard Stallman <rms@gnu.org>
Thu, 16 Jul 1992 19:26:42 +0000 (19:26 +0000)
From-SVN: r1595

gcc/c-typeck.c

index c4246215c7096c31d1bfa7575a7e211dc61c3295..c542988f1f01bc93800fdf0eb64c7de5e7855e84 100644 (file)
@@ -2356,7 +2356,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
              else if (TREE_INT_CST_LOW (op1) < 0)
                warning ("shift count is negative");
              if (TREE_INT_CST_LOW (op1) >= TYPE_PRECISION (type0))
-               warning ("shift count exceeds width of value shifted");
+               warning ("shift count >= width of type");
            }
          /* Use the type of the value to be shifted.
             This is what most traditional C compilers do.  */
@@ -2381,7 +2381,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
            warning ("shift count is negative");
          if (TREE_CODE (op1) == INTEGER_CST
              && TREE_INT_CST_LOW (op1) >= TYPE_PRECISION (type0))
-           warning ("shift count exceeds width of value shifted");
+           warning ("shift count >= width of type");
          /* Use the type of the value to be shifted.
             This is what most traditional C compilers do.  */
          result_type = type0;
@@ -2406,7 +2406,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
            warning ("shift count is negative");
          if (TREE_CODE (op1) == INTEGER_CST
              && TREE_INT_CST_LOW (op1) >= TYPE_PRECISION (type0))
-           warning ("shift count >= width of value shifted");
+           warning ("shift count >= width of type");
          /* Use the type of the value to be shifted.
             This is what most traditional C compilers do.  */
          result_type = type0;