aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@valinux.com>2000-07-17 08:33:55 +0000
committerJeff Law <law@gcc.gnu.org>2000-07-17 02:33:55 -0600
commit2c492eef0d20649c4500dbb7011663abc6c5de71 (patch)
tree1429eef54b694ae473f1e88e8e18b5e6771e3f7e
parentbed10af2a49959bbf96a800f326a2e00650b9413 (diff)
downloadgcc-2c492eef0d20649c4500dbb7011663abc6c5de71.zip
gcc-2c492eef0d20649c4500dbb7011663abc6c5de71.tar.gz
gcc-2c492eef0d20649c4500dbb7011663abc6c5de71.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-common.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ec19678..2809e92 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 8a8103b..1e31b29 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))))