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
This commit is contained in:
Chip Salzenberg 2000-07-17 08:33:55 +00:00 committed by Jeff Law
parent bed10af2a4
commit 2c492eef0d
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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))))