aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-07-16 19:26:42 +0000
committerRichard Stallman <rms@gnu.org>1992-07-16 19:26:42 +0000
commitce889f00cd1e8c5fd27628746b53cd8f206e64a3 (patch)
treedfd594b6799045ac8a1d6e8bc9b1ef363200a286
parent74bd77a8c6d93ee63bc3c3f604a64f2862754047 (diff)
downloadgcc-ce889f00cd1e8c5fd27628746b53cd8f206e64a3.zip
gcc-ce889f00cd1e8c5fd27628746b53cd8f206e64a3.tar.gz
gcc-ce889f00cd1e8c5fd27628746b53cd8f206e64a3.tar.bz2
(build_binary_op): Improve shift warning messages.
From-SVN: r1595
-rw-r--r--gcc/c-typeck.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index c424621..c542988 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;