diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-10-20 21:44:35 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-10-20 21:44:35 -0400 |
commit | 60e02b1e4e025625ea27747e87bab7eac7295cfc (patch) | |
tree | ead3cb5c665655c5209b1357e6b70750f4071ec4 /gcc | |
parent | b156894e315181ce7c0e33d51b783d551c8a606f (diff) | |
download | gcc-60e02b1e4e025625ea27747e87bab7eac7295cfc.zip gcc-60e02b1e4e025625ea27747e87bab7eac7295cfc.tar.gz gcc-60e02b1e4e025625ea27747e87bab7eac7295cfc.tar.bz2 |
(check_format_info): Consider "char", "signed char", and "unsigned
char" types as equivalent.
From-SVN: r5849
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index b6bc0e4..86f4ed7 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; |