From: Richard Stallman Date: Thu, 16 Jul 1992 19:26:42 +0000 (+0000) Subject: (build_binary_op): Improve shift warning messages. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce889f00cd1e8c5fd27628746b53cd8f206e64a3;p=gcc.git (build_binary_op): Improve shift warning messages. From-SVN: r1595 --- diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index c4246215c70..c542988f1f0 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -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;