Commit 2c492eef by Chip Salzenberg Committed by Jeff Law

c-common.c (shorten_compare): Quiet warnings about unsigned comparisons with zero when...

        * c-common.c (shorten_compare): Quiet warnings about unsigned
        comparisons with zero when they occur in a system header.

From-SVN: r35077
parent bed10af2
2000-07-17 Chip Salzenberg <chip@valinux.com>
* c-common.c (shorten_compare): Quiet warnings about unsigned
comparisons with zero when they occur in a system header.
2000-07-17 Joseph S. Myers <jsm28@cam.ac.uk>
* c-common.c (check_format_info): Do not make a pedantic objection
......
......@@ -2833,7 +2833,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
are requested. However, if OP0 is a constant that is
>= 0, the signedness of the comparison isn't an issue,
so suppress the warning. */
if (extra_warnings
if (extra_warnings && !in_system_header
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
primop0))))
......@@ -2842,7 +2842,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
break;
case LT_EXPR:
if (extra_warnings
if (extra_warnings && !in_system_header
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
primop0))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment