summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@rabi.phys.columbia.edu>1998-11-19 19:40:56 +0000
committerJeff Law <law@gcc.gnu.org>1998-11-19 12:40:56 -0700
commit07be2a23729599fd76630d15e26e99d8e29c897e (patch)
treefa266794ce38967b19c4f9ec6bcdd9dc4f2fdb26 /gcc/c-common.c
parent74285159e4f348ab625717586a9dfa46ee0c8816 (diff)
downloadgcc-07be2a23729599fd76630d15e26e99d8e29c897e.tar.gz
c-common.c: Change warning messages to say `comparison is always true' or `comparison is...
* c-common.c: Change warning messages to say `comparison is always true' or `comparison is always false' instead of the confusing `is always 0', `is always 1'. From-SVN: r23723
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index f45b5662020..653af682d70 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2512,18 +2512,18 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
/* This is the case of (char)x >?< 0x80, which people used to use
expecting old C compilers to change the 0x80 into -0x80. */
if (val == boolean_false_node)
- warning ("comparison is always 0 due to limited range of data type");
+ warning ("comparison is always false due to limited range of data type");
if (val == boolean_true_node)
- warning ("comparison is always 1 due to limited range of data type");
+ warning ("comparison is always true due to limited range of data type");
}
if (!min_lt && unsignedp0 && TREE_CODE (primop0) != INTEGER_CST)
{
/* This is the case of (unsigned char)x >?< -1 or < 0. */
if (val == boolean_false_node)
- warning ("comparison is always 0 due to limited range of data type");
+ warning ("comparison is always false due to limited range of data type");
if (val == boolean_true_node)
- warning ("comparison is always 1 due to limited range of data type");
+ warning ("comparison is always true due to limited range of data type");
}
if (val != 0)
@@ -2589,7 +2589,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
primop0))))
- warning ("unsigned value >= 0 is always 1");
+ warning ("comparison of unsigned expression >= 0 is always true");
value = boolean_true_node;
break;
@@ -2598,7 +2598,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
primop0))))
- warning ("unsigned value < 0 is always 0");
+ warning ("comparison of unsigned expression < 0 is always false");
value = boolean_false_node;
break;