From 78dafd61cf766d53f6c913dc9c3fc22b784c11dc Mon Sep 17 00:00:00 2001 From: rms Date: Wed, 24 Nov 1993 23:14:43 +0000 Subject: [PATCH] (shorten_compare): Correct typo from last change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6157 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-common.c | 10 +++++----- 1 file 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) -- 2.7.4