From 60e02b1e4e025625ea27747e87bab7eac7295cfc Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 20 Oct 1993 21:44:35 -0400 Subject: [PATCH] (check_format_info): Consider "char", "signed char", and "unsigned char" types as equivalent. From-SVN: r5849 --- gcc/c-common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/c-common.c b/gcc/c-common.c index b6bc0e47f79..86f4ed7a466 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -899,7 +899,12 @@ check_format_info (info, params) && TREE_CODE (cur_type) == INTEGER_TYPE && (TREE_UNSIGNED (wanted_type) ? wanted_type == unsigned_type (cur_type) - : wanted_type == signed_type (cur_type)))) + : wanted_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))) { register char *this; register char *that; -- 2.30.2