(build_binary_op): Improve shift warning messages.

From-SVN: r1595
This commit is contained in:
Richard Stallman 1992-07-16 19:26:42 +00:00
parent 74bd77a8c6
commit ce889f00cd

View 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;