aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-11-24 23:14:43 +0000
committerRichard Stallman <rms@gnu.org>1993-11-24 23:14:43 +0000
commitb7c9c707a653e01c89658245570d8b459f0ce12d (patch)
tree4acefae027ac6b42e1d5d3305d9765b4b647a8fa /gcc/c-common.c
parent535e79835a08d869879f402c99694ece98ca769e (diff)
downloadgcc-b7c9c707a653e01c89658245570d8b459f0ce12d.zip
gcc-b7c9c707a653e01c89658245570d8b459f0ce12d.tar.gz
gcc-b7c9c707a653e01c89658245570d8b459f0ce12d.tar.bz2
(shorten_compare): Correct typo from last change.
From-SVN: r6157
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 57e2e41..4e80cd8 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -899,15 +899,15 @@ check_format_info (info, params)
&& fci->pointer_count > 0)
/* Don't warn about differences merely in signedness. */
&& !(TREE_CODE (wanted_type) == INTEGER_TYPE
- && TREE_CODE (cur_type) == INTEGER_TYPE
+ && TREE_CODE (TYPE_MAIN_VARIANT (cur_type)) == INTEGER_TYPE
&& (TREE_UNSIGNED (wanted_type)
? wanted_type == (cur_type = unsigned_type (cur_type))
: wanted_type == (cur_type = signed_type (cur_type))))
/* Likewise, "signed char", "unsigned char" and "char" are
equivalent but the above test won't consider them equivalent. */
&& ! (wanted_type == char_type_node
- && (cur_type == signed_char_type_node
- || cur_type == unsigned_char_type_node)))
+ && (TYPE_MAIN_VARIANT (cur_type) == signed_char_type_node
+ || TYPE_MAIN_VARIANT (cur_type) == unsigned_char_type_node)))
{
register char *this;
register char *that;
@@ -1458,7 +1458,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
type = unsigned_type (type);
}
- if (!max_gt && !unsignedp0 && TREE_CODE (primop1) != INTEGER_CST)
+ if (!max_gt && !unsignedp0 && TREE_CODE (primop0) != INTEGER_CST)
{
/* This is the case of (char)x >?< 0x80, which people used to use
expecting old C compilers to change the 0x80 into -0x80. */
@@ -1468,7 +1468,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
warning ("comparison is always 1 due to limited range of data type");
}
- if (!min_lt && unsignedp0 && TREE_CODE (primop1) != INTEGER_CST)
+ if (!min_lt && unsignedp0 && TREE_CODE (primop0) != INTEGER_CST)
{
/* This is the case of (unsigned char)x >?< -1 or < 0. */
if (val == integer_zero_node)