diff options
author | Richard Stallman <rms@gnu.org> | 1992-05-08 21:25:25 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-05-08 21:25:25 +0000 |
commit | 1e276c4accd82e3e86f7c6b2f0cc6052cbeb4d22 (patch) | |
tree | fb42317473c54f04cd8c4f8f0c384c62efb3fb70 /gcc/c-common.c | |
parent | ae34b95d5a9db73b003e146b7e485fca90fd797a (diff) | |
download | gcc-1e276c4accd82e3e86f7c6b2f0cc6052cbeb4d22.zip gcc-1e276c4accd82e3e86f7c6b2f0cc6052cbeb4d22.tar.gz gcc-1e276c4accd82e3e86f7c6b2f0cc6052cbeb4d22.tar.bz2 |
*** empty log message ***
From-SVN: r940
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index a59a226..584a4a5 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -623,7 +623,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) type = unsigned_type (type); } - if (max_lt && !unsignedp0) + if (!max_gt && !unsignedp0) { /* This is the case of (char)x >?< 0x80, which people used to use expecting old C compilers to change the 0x80 into -0x80. */ @@ -633,9 +633,9 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr) warning ("comparison is always 1 due to limited range of data type"); } - if (min_gt && unsignedp0) + if (!min_lt && unsignedp0) { - /* This is the case of (unsigned char)x >?< -1. */ + /* This is the case of (unsigned char)x >?< -1 or < 0. */ if (val == integer_zero_node) warning ("comparison is always 0 due to limited range of data type"); if (val == integer_one_node) |