diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ec196780fe2..2809e928652 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-07-17 Chip Salzenberg + + * 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 * c-common.c (check_format_info): Do not make a pedantic objection diff --git a/gcc/c-common.c b/gcc/c-common.c index 8a8103bbb7a..1e31b29e9f1 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -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))))